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, wait
count, hasAny
clearObj
protected final IItemHandlerModifiable inv
public RecipeWrapper(IItemHandlerModifiable inv)
public int getSizeInventory()
#getHeight()
* #getWidth()
.getSizeInventory
in interface IInventory
public ItemStack getStackInSlot(int slot)
getStackInSlot
in interface IInventory
public ItemStack decrStackSize(int slot, int count)
decrStackSize
in interface IInventory
public void setInventorySlotContents(int slot, ItemStack stack)
setInventorySlotContents
in interface IInventory
public ItemStack removeStackFromSlot(int index)
removeStackFromSlot
in interface IInventory
public boolean isEmpty()
isEmpty
in interface IInventory
public boolean isItemValidForSlot(int slot, ItemStack stack)
isItemValidForSlot
in interface IInventory
public void clear()
clear
in interface IClearable
public int getInventoryStackLimit()
getInventoryStackLimit
in interface IInventory
public void markDirty()
markDirty
in interface IInventory
public boolean isUsableByPlayer(PlayerEntity player)
isUsableByPlayer
in interface IInventory
public void openInventory(PlayerEntity player)
openInventory
in interface IInventory
public void closeInventory(PlayerEntity player)
closeInventory
in interface IInventory