public class PlayerMainInvWrapper extends InvWrapper
| Modifier and Type | Field and Description |
|---|---|
InventoryPlayer |
inventoryPlayer |
inv| Constructor and Description |
|---|
PlayerMainInvWrapper(InventoryPlayer inv) |
| Modifier and Type | Method and Description |
|---|---|
ItemStack |
extractItem(int slot,
int amount,
boolean simulate)
Extracts an ItemStack from the given slot.
|
int |
getSlots()
Returns the number of slots available
|
ItemStack |
getStackInSlot(int slot)
Returns the ItemStack in a given slot.
|
ItemStack |
insertItem(int slot,
ItemStack stack,
boolean simulate)
Inserts an ItemStack into the given slot and return the remainder.
|
void |
setStackInSlot(int slot,
ItemStack stack)
Overrides the stack in the given slot.
|
equals, hashCodepublic final InventoryPlayer inventoryPlayer
public PlayerMainInvWrapper(InventoryPlayer inv)
public int getSlots()
IItemHandlergetSlots in interface IItemHandlergetSlots in class InvWrapperpublic void setStackInSlot(int slot,
ItemStack stack)
IItemHandlerModifiablesetStackInSlot in interface IItemHandlerModifiablesetStackInSlot in class InvWrapperslot - Slot to modifystack - ItemStack to set slot to (may be null)public ItemStack getStackInSlot(int slot)
IItemHandlergetStackInSlot in interface IItemHandlergetStackInSlot in class InvWrapperslot - Slot to querypublic ItemStack insertItem(int slot, ItemStack stack, boolean simulate)
IItemHandlerinsertItem in interface IItemHandlerinsertItem in class InvWrapperslot - Slot to insert into.stack - ItemStack to insert.simulate - If true, the insertion is only simulatedpublic ItemStack extractItem(int slot, int amount, boolean simulate)
IItemHandlerextractItem in interface IItemHandlerextractItem in class InvWrapperslot - Slot to extract from.amount - Amount to extract (may be greater than the current stacks max limit)simulate - If true, the extraction is only simulated