Package net.minecraftforge.items
Class SlotItemHandler
- java.lang.Object
-
- net.minecraft.inventory.container.Slot
-
- net.minecraftforge.items.SlotItemHandler
-
public class SlotItemHandler extends Slot
-
-
Field Summary
Fields Modifier and Type Field Description private static IInventoryemptyInventoryprivate intindexprivate IItemHandleritemHandler
-
Constructor Summary
Constructors Constructor Description SlotItemHandler(IItemHandler itemHandler, int index, int xPosition, int yPosition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemStackgetItem()IItemHandlergetItemHandler()intgetMaxStackSize()intgetMaxStackSize(ItemStack stack)booleanmayPickup(PlayerEntity playerIn)booleanmayPlace(ItemStack stack)voidonQuickCraft(ItemStack oldStackIn, ItemStack newStackIn)ItemStackremove(int amount)voidset(ItemStack stack)-
Methods inherited from class net.minecraft.inventory.container.Slot
checkTakeAchievements, getNoItemIcon, getSlotIndex, hasItem, isActive, isSameInventory, onQuickCraft, onSwapCraft, onTake, setBackground, setChanged
-
-
-
-
Field Detail
-
emptyInventory
private static IInventory emptyInventory
-
itemHandler
private final IItemHandler itemHandler
-
index
private final int index
-
-
Constructor Detail
-
SlotItemHandler
public SlotItemHandler(IItemHandler itemHandler, int index, int xPosition, int yPosition)
-
-
Method Detail
-
onQuickCraft
public void onQuickCraft(@Nonnull ItemStack oldStackIn, @Nonnull ItemStack newStackIn)- Overrides:
onQuickCraftin classSlot
-
getMaxStackSize
public int getMaxStackSize()
- Overrides:
getMaxStackSizein classSlot
-
getMaxStackSize
public int getMaxStackSize(@Nonnull ItemStack stack)- Overrides:
getMaxStackSizein classSlot
-
mayPickup
public boolean mayPickup(PlayerEntity playerIn)
-
getItemHandler
public IItemHandler getItemHandler()
-
-