public class TileEntityHopper extends TileEntityLockableLoot implements IHopper, ITickable
customName, lootTable, lootTableSeedblockType, INFINITE_EXTENT_AABB, pos, tileEntityInvalid, world| Constructor and Description |
|---|
TileEntityHopper() |
| Modifier and Type | Method and Description |
|---|---|
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> |
getCaptureItems(World worldIn,
double p_184292_1_,
double p_184292_3_,
double p_184292_5_) |
java.lang.String |
getGuiID() |
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.
|
protected NonNullList<ItemStack> |
getItems() |
long |
getLastUpdateTime() |
java.lang.String |
getName()
Get the name of this object.
|
int |
getSizeInventory()
Returns the number of slots in the inventory.
|
static IInventory |
getSourceInventory(IHopper hopper)
Gets the inventory that the provided hopper will transfer items from.
|
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 |
isEmpty() |
boolean |
mayTransfer() |
static boolean |
pullItems(IHopper hopper)
Pull dropped
EntityItems from the world above the hopper and items
from any inventory attached to this hopper into the hopper's inventory. |
static boolean |
putDropInInventoryAllSlots(IInventory source,
IInventory destination,
EntityItem entity)
Attempts to place the passed EntityItem's stack into the inventory using as many slots as possible.
|
static ItemStack |
putStackInInventoryAllSlots(IInventory source,
IInventory destination,
ItemStack stack,
EnumFacing direction)
Attempts to place the passed stack in the inventory, using as many slots as required.
|
void |
readFromNBT(NBTTagCompound compound) |
static void |
registerFixesHopper(DataFixer fixer) |
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.
|
protected boolean |
updateHopper() |
NBTTagCompound |
writeToNBT(NBTTagCompound compound) |
checkLootAndRead, checkLootAndWrite, clear, closeInventory, fillWithLoot, getField, getFieldCount, getLootTable, getStackInSlot, hasCustomName, isItemValidForSlot, isUsableByPlayer, openInventory, removeStackFromSlot, setCustomName, setField, setLootTablegetCapability, getDisplayName, getLockCode, hasCapability, isLocked, setLockCodeaddInfoToCrashReport, canRenderBreaking, create, deserializeNBT, getBlockMetadata, getBlockType, getDistanceSq, getKey, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getUpdatePacket, getUpdateTag, getWorld, handleUpdateTag, hasFastRenderer, hasWorld, invalidate, isInvalid, markDirty, mirror, onChunkUnload, onDataPacket, onLoad, onlyOpsCanSetNbt, receiveClientEvent, register, restrictNBTCopy, rotate, serializeNBT, setPos, setWorld, setWorldCreate, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, closeInventory, getField, getFieldCount, getStackInSlot, isItemValidForSlot, isUsableByPlayer, markDirty, openInventory, removeStackFromSlot, setFieldgetDisplayName, hasCustomNamepublic static void registerFixesHopper(DataFixer fixer)
public void readFromNBT(NBTTagCompound compound)
readFromNBT in class TileEntityLockablepublic NBTTagCompound writeToNBT(NBTTagCompound compound)
writeToNBT in class TileEntityLockablepublic int getSizeInventory()
getSizeInventory in interface IInventorypublic ItemStack decrStackSize(int index, int count)
decrStackSize in interface IInventorydecrStackSize in class TileEntityLockableLootpublic void setInventorySlotContents(int index,
ItemStack stack)
setInventorySlotContents in interface IInventorysetInventorySlotContents in class TileEntityLockableLootpublic java.lang.String getName()
getName in interface IWorldNameablepublic int getInventoryStackLimit()
getInventoryStackLimit in interface IInventorypublic void update()
protected boolean updateHopper()
public boolean isEmpty()
isEmpty in interface IInventorypublic static boolean pullItems(IHopper hopper)
EntityItems from the world above the hopper and items
from any inventory attached to this hopper into the hopper's inventory.hopper - the hopper in questionpublic static boolean putDropInInventoryAllSlots(IInventory source, IInventory destination, EntityItem entity)
protected IItemHandler createUnSidedHandler()
createUnSidedHandler in class TileEntityLockablepublic static ItemStack putStackInInventoryAllSlots(IInventory source, IInventory destination, ItemStack stack, EnumFacing direction)
public static IInventory getSourceInventory(IHopper hopper)
public static java.util.List<EntityItem> getCaptureItems(World worldIn, double p_184292_1_, double p_184292_3_, double p_184292_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 mayTransfer()
public java.lang.String getGuiID()
getGuiID in interface IInteractionObjectpublic Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
createContainer in interface IInteractionObjectprotected NonNullList<ItemStack> getItems()
getItems in class TileEntityLockableLootpublic long getLastUpdateTime()