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 IInventory
emptyInventory
private int
index
private IItemHandler
itemHandler
-
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 ItemStack
getItem()
IItemHandler
getItemHandler()
int
getMaxStackSize()
int
getMaxStackSize(ItemStack stack)
boolean
mayPickup(PlayerEntity playerIn)
boolean
mayPlace(ItemStack stack)
void
onQuickCraft(ItemStack oldStackIn, ItemStack newStackIn)
ItemStack
remove(int amount)
void
set(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:
onQuickCraft
in classSlot
-
getMaxStackSize
public int getMaxStackSize()
- Overrides:
getMaxStackSize
in classSlot
-
getMaxStackSize
public int getMaxStackSize(@Nonnull ItemStack stack)
- Overrides:
getMaxStackSize
in classSlot
-
mayPickup
public boolean mayPickup(PlayerEntity playerIn)
-
getItemHandler
public IItemHandler getItemHandler()
-
-