public class TileEntityHopper extends TileEntityLockable implements IHopper, ITickable
blockType, INFINITE_EXTENT_AABB, pos, tileEntityInvalid, worldObj| Constructor and Description |
|---|
TileEntityHopper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
captureDroppedItems(IHopper p_145891_0_) |
void |
clear() |
void |
closeInventory(EntityPlayer player) |
Container |
createContainer(InventoryPlayer playerInventory,
EntityPlayer playerIn) |
protected IItemHandler |
createUnSidedHandler() |
ItemStack |
decrStackSize(int index,
int count)
Removes up to a specified number of items from an inventory slot and returns them in a new stack.
|
static java.util.List<EntityItem> |
func_181556_a(World p_181556_0_,
double p_181556_1_,
double p_181556_3_,
double p_181556_5_) |
int |
getField(int id) |
int |
getFieldCount() |
java.lang.String |
getGuiID() |
static IInventory |
getHopperInventory(IHopper hopper)
Returns the IInventory for the specified hopper
|
static IInventory |
getInventoryAtPosition(World worldIn,
double x,
double y,
double z)
Returns the IInventory (if applicable) of the TileEntity at the specified position
|
int |
getInventoryStackLimit()
Returns the maximum stack size for a inventory slot.
|
java.lang.String |
getName()
Get the name of this object.
|
int |
getSizeInventory()
Returns the number of slots in the inventory.
|
ItemStack |
getStackInSlot(int index)
Returns the stack in the given slot.
|
double |
getXPos()
Gets the world X position for this hopper entity.
|
double |
getYPos()
Gets the world Y position for this hopper entity.
|
double |
getZPos()
Gets the world Z position for this hopper entity.
|
boolean |
hasCustomName()
Returns true if this thing is named
|
boolean |
isItemValidForSlot(int index,
ItemStack stack)
Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
|
boolean |
isOnTransferCooldown() |
boolean |
isUseableByPlayer(EntityPlayer player)
Do not make give this method the name canInteractWith because it clashes with Container
|
void |
markDirty()
For tile entities, ensures the chunk containing the tile entity is saved to disk later - the game won't think it
hasn't changed and skip it.
|
boolean |
mayTransfer() |
void |
openInventory(EntityPlayer player) |
static boolean |
putDropInInventoryAllSlots(IInventory p_145898_0_,
EntityItem itemIn)
Attempts to place the passed EntityItem's stack into the inventory using as many slots as possible.
|
static ItemStack |
putStackInInventoryAllSlots(IInventory inventoryIn,
ItemStack stack,
EnumFacing side)
Attempts to place the passed stack in the inventory, using as many slots as required.
|
void |
readFromNBT(NBTTagCompound compound) |
ItemStack |
removeStackFromSlot(int index)
Removes a stack from the given slot and returns it.
|
void |
setCustomName(java.lang.String customNameIn) |
void |
setField(int id,
int value) |
void |
setInventorySlotContents(int index,
ItemStack stack)
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
|
void |
setTransferCooldown(int ticks) |
void |
update()
Like the old updateEntity(), except more generic.
|
boolean |
updateHopper() |
void |
writeToNBT(NBTTagCompound compound) |
getCapability, getDisplayName, getLockCode, hasCapability, isLocked, setLockCodeaddInfoToCrashReport, addMapping, canRenderBreaking, createAndLoadEntity, deserializeNBT, func_183000_F, getBlockMetadata, getBlockType, getDescriptionPacket, getDistanceSq, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getWorld, hasFastRenderer, hasWorldObj, invalidate, isInvalid, onChunkUnload, onDataPacket, onLoad, receiveClientEvent, restrictNBTCopy, serializeNBT, setPos, setWorldObj, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDisplayNamepublic void readFromNBT(NBTTagCompound compound)
readFromNBT in class TileEntityLockablepublic void writeToNBT(NBTTagCompound compound)
writeToNBT in class TileEntityLockablepublic void markDirty()
markDirty in interface IInventorymarkDirty in class TileEntitypublic int getSizeInventory()
getSizeInventory in interface IInventorypublic ItemStack getStackInSlot(int index)
getStackInSlot in interface IInventorypublic ItemStack decrStackSize(int index, int count)
decrStackSize in interface IInventorypublic ItemStack removeStackFromSlot(int index)
removeStackFromSlot in interface IInventorypublic void setInventorySlotContents(int index,
ItemStack stack)
setInventorySlotContents in interface IInventorypublic java.lang.String getName()
getName in interface IWorldNameablepublic boolean hasCustomName()
hasCustomName in interface IWorldNameablepublic void setCustomName(java.lang.String customNameIn)
public int getInventoryStackLimit()
getInventoryStackLimit in interface IInventorypublic boolean isUseableByPlayer(EntityPlayer player)
isUseableByPlayer in interface IInventorypublic void openInventory(EntityPlayer player)
openInventory in interface IInventorypublic void closeInventory(EntityPlayer player)
closeInventory in interface IInventorypublic boolean isItemValidForSlot(int index,
ItemStack stack)
isItemValidForSlot in interface IInventorypublic void update()
public boolean updateHopper()
public static boolean captureDroppedItems(IHopper p_145891_0_)
public static boolean putDropInInventoryAllSlots(IInventory p_145898_0_, EntityItem itemIn)
public static ItemStack putStackInInventoryAllSlots(IInventory inventoryIn, ItemStack stack, EnumFacing side)
public static IInventory getHopperInventory(IHopper hopper)
public static java.util.List<EntityItem> func_181556_a(World p_181556_0_, double p_181556_1_, double p_181556_3_, double p_181556_5_)
public static IInventory getInventoryAtPosition(World worldIn, double x, double y, double z)
public double getXPos()
public double getYPos()
public double getZPos()
public void setTransferCooldown(int ticks)
public boolean isOnTransferCooldown()
public boolean mayTransfer()
public java.lang.String getGuiID()
getGuiID in interface IInteractionObjectpublic Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
createContainer in interface IInteractionObjectpublic int getField(int id)
getField in interface IInventorypublic void setField(int id,
int value)
setField in interface IInventorypublic int getFieldCount()
getFieldCount in interface IInventorypublic void clear()
clear in interface IInventoryprotected IItemHandler createUnSidedHandler()
createUnSidedHandler in class TileEntityLockable