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, waitgetDisplayNameprotected 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 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 int getHeight()
getHeight in interface IInventorypublic int getWidth()
getWidth 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 IInventorypublic int getInventoryStackLimit()
getInventoryStackLimit in interface IInventorypublic void markDirty()
markDirty in interface IInventorypublic boolean isUsableByPlayer(EntityPlayer player)
isUsableByPlayer in interface IInventorypublic void openInventory(EntityPlayer player)
openInventory in interface IInventorypublic void closeInventory(EntityPlayer player)
closeInventory in interface IInventorypublic int getField(int id)
getField in interface IInventorypublic void setField(int id,
int value)
setField in interface IInventorypublic int getFieldCount()
getFieldCount in interface IInventorypublic ITextComponent getName()
public boolean hasCustomName()
hasCustomName in interface INameablepublic ITextComponent getCustomName()
getCustomName in interface INameable