public class RecipeWrapper extends java.lang.Object implements IInventory
Modifier and Type | Field and Description |
---|---|
protected int |
height |
protected IItemHandlerModifiable |
inv |
protected int |
width |
Constructor and Description |
---|
RecipeWrapper(IItemHandlerModifiable inv,
int width,
int height) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
closeInventory(EntityPlayer player) |
ItemStack |
decrStackSize(int slot,
int count)
Attempts to remove n items from the specified slot.
|
ITextComponent |
getCustomName() |
int |
getField(int id) |
int |
getFieldCount() |
int |
getHeight()
Returns the height of this inventory.
|
int |
getInventoryStackLimit() |
ITextComponent |
getName() |
int |
getSizeInventory()
Returns the size of this inventory.
|
ItemStack |
getStackInSlot(int slot)
Returns the stack in this slot.
|
int |
getWidth()
Returns the width of this inventory.
|
boolean |
hasCustomName() |
boolean |
isEmpty() |
boolean |
isItemValidForSlot(int slot,
ItemStack stack) |
boolean |
isUsableByPlayer(EntityPlayer player) |
void |
markDirty() |
void |
openInventory(EntityPlayer player) |
ItemStack |
removeStackFromSlot(int index)
Removes the stack contained in this slot from the underlying handler, and returns it.
|
void |
setField(int id,
int value) |
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
getDisplayName
protected final IItemHandlerModifiable inv
protected final int width
protected final int height
public RecipeWrapper(IItemHandlerModifiable inv, int width, int height)
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 int getHeight()
getHeight
in interface IInventory
public int getWidth()
getWidth
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 IInventory
public int getInventoryStackLimit()
getInventoryStackLimit
in interface IInventory
public void markDirty()
markDirty
in interface IInventory
public boolean isUsableByPlayer(EntityPlayer player)
isUsableByPlayer
in interface IInventory
public void openInventory(EntityPlayer player)
openInventory
in interface IInventory
public void closeInventory(EntityPlayer player)
closeInventory
in interface IInventory
public int getField(int id)
getField
in interface IInventory
public void setField(int id, int value)
setField
in interface IInventory
public int getFieldCount()
getFieldCount
in interface IInventory
public ITextComponent getName()
public boolean hasCustomName()
hasCustomName
in interface INameable
public ITextComponent getCustomName()
getCustomName
in interface INameable