public class SlotItemHandler extends Slot
Modifier and Type | Field and Description |
---|---|
private static IInventory |
emptyInventory |
private int |
index |
private IItemHandler |
itemHandler |
inventory, slotNumber, xPos, yPos
Constructor and Description |
---|
SlotItemHandler(IItemHandler itemHandler,
int index,
int xPosition,
int yPosition) |
Modifier and Type | Method and Description |
---|---|
boolean |
canTakeStack(PlayerEntity playerIn) |
ItemStack |
decrStackSize(int amount) |
IItemHandler |
getItemHandler() |
int |
getItemStackLimit(ItemStack stack) |
int |
getSlotStackLimit() |
ItemStack |
getStack() |
boolean |
isItemValid(ItemStack stack) |
void |
onSlotChange(ItemStack oldStackIn,
ItemStack newStackIn) |
void |
putStack(ItemStack stack) |
func_225517_c_, getHasStack, getSlotIndex, isEnabled, isSameInventory, onCrafting, onCrafting, onSlotChanged, onSwapCraft, onTake, setBackground
private static IInventory emptyInventory
private final IItemHandler itemHandler
private final int index
public SlotItemHandler(IItemHandler itemHandler, int index, int xPosition, int yPosition)
public boolean isItemValid(@Nonnull ItemStack stack)
isItemValid
in class Slot
public void onSlotChange(@Nonnull ItemStack oldStackIn, @Nonnull ItemStack newStackIn)
onSlotChange
in class Slot
public int getSlotStackLimit()
getSlotStackLimit
in class Slot
public int getItemStackLimit(@Nonnull ItemStack stack)
getItemStackLimit
in class Slot
public boolean canTakeStack(PlayerEntity playerIn)
canTakeStack
in class Slot
@Nonnull public ItemStack decrStackSize(int amount)
decrStackSize
in class Slot
public IItemHandler getItemHandler()