public class RecipeWrapper extends java.lang.Object implements IInventory
| Modifier and Type | Field and Description |
|---|---|
protected IItemHandlerModifiable |
inv |
| Constructor and Description |
|---|
RecipeWrapper(IItemHandlerModifiable inv) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
closeInventory(PlayerEntity player) |
ItemStack |
decrStackSize(int slot,
int count)
Attempts to remove n items from the specified slot.
|
int |
getInventoryStackLimit() |
int |
getSizeInventory()
Returns the size of this inventory.
|
ItemStack |
getStackInSlot(int slot)
Returns the stack in this slot.
|
boolean |
isEmpty() |
boolean |
isItemValidForSlot(int slot,
ItemStack stack) |
boolean |
isUsableByPlayer(PlayerEntity player) |
void |
markDirty() |
void |
openInventory(PlayerEntity player) |
ItemStack |
removeStackFromSlot(int index)
Removes the stack contained in this slot from the underlying handler, and returns it.
|
void |
setInventorySlotContents(int slot,
ItemStack stack)
Sets the contents of this slot to the provided stack.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcount, hasAnyclearObjprotected final IItemHandlerModifiable inv
public RecipeWrapper(IItemHandlerModifiable inv)
public int getSizeInventory()
#getHeight() * #getWidth().getSizeInventory in interface IInventorypublic ItemStack getStackInSlot(int slot)
getStackInSlot in interface IInventorypublic ItemStack decrStackSize(int slot, int count)
decrStackSize in interface IInventorypublic void setInventorySlotContents(int slot,
ItemStack stack)
setInventorySlotContents in interface IInventorypublic ItemStack removeStackFromSlot(int index)
removeStackFromSlot in interface IInventorypublic boolean isEmpty()
isEmpty in interface IInventorypublic boolean isItemValidForSlot(int slot,
ItemStack stack)
isItemValidForSlot in interface IInventorypublic void clear()
clear in interface IClearablepublic int getInventoryStackLimit()
getInventoryStackLimit in interface IInventorypublic void markDirty()
markDirty in interface IInventorypublic boolean isUsableByPlayer(PlayerEntity player)
isUsableByPlayer in interface IInventorypublic void openInventory(PlayerEntity player)
openInventory in interface IInventorypublic void closeInventory(PlayerEntity player)
closeInventory in interface IInventory