public class TileEntityHopper extends TileEntityLockableLoot implements IHopper, ITickable
| Modifier and Type | Field and Description |
|---|---|
private NonNullList<ItemStack> |
inventory |
private long |
tickedGameTime |
private int |
transferCooldown |
customName, lootTable, lootTableSeedblockType, INFINITE_EXTENT_AABB, pos, tileEntityInvalid, world| Constructor and Description |
|---|
TileEntityHopper() |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
canCombine(ItemStack stack1,
ItemStack stack2) |
private static boolean |
canExtractItemFromSlot(IInventory inventoryIn,
ItemStack stack,
int index,
EnumFacing side) |
private static boolean |
canInsertItemInSlot(IInventory inventoryIn,
ItemStack stack,
int index,
EnumFacing side) |
Container |
createContainer(InventoryPlayer playerInventory,
EntityPlayer playerIn) |
protected IItemHandler |
createUnSidedHandler() |
ItemStack |
decrStackSize(int index,
int count) |
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) |
private IInventory |
getInventoryForHopperTransfer() |
int |
getInventoryStackLimit() |
protected NonNullList<ItemStack> |
getItems() |
long |
getLastUpdateTime() |
java.lang.String |
getName() |
int |
getSizeInventory() |
static IInventory |
getSourceInventory(IHopper hopper) |
double |
getXPos() |
double |
getYPos() |
double |
getZPos() |
private static ItemStack |
insertStack(IInventory source,
IInventory destination,
ItemStack stack,
int index,
EnumFacing direction) |
boolean |
isEmpty() |
private boolean |
isFull() |
private boolean |
isInventoryEmpty() |
private static boolean |
isInventoryEmpty(IInventory inventoryIn,
EnumFacing side) |
private boolean |
isInventoryFull(IInventory inventoryIn,
EnumFacing side) |
private boolean |
isOnTransferCooldown() |
boolean |
mayTransfer() |
private static boolean |
pullItemFromSlot(IHopper hopper,
IInventory inventoryIn,
int index,
EnumFacing direction) |
static boolean |
pullItems(IHopper hopper) |
static boolean |
putDropInInventoryAllSlots(IInventory source,
IInventory destination,
EntityItem entity) |
static ItemStack |
putStackInInventoryAllSlots(IInventory source,
IInventory destination,
ItemStack stack,
EnumFacing direction) |
void |
readFromNBT(NBTTagCompound compound) |
static void |
registerFixesHopper(DataFixer fixer) |
void |
setInventorySlotContents(int index,
ItemStack stack) |
void |
setTransferCooldown(int ticks) |
private boolean |
transferItemsOut() |
void |
update() |
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, hasCustomNameprivate NonNullList<ItemStack> inventory
private int transferCooldown
private long tickedGameTime
public 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 IInventoryprotected boolean updateHopper()
private boolean isInventoryEmpty()
public boolean isEmpty()
isEmpty in interface IInventoryprivate boolean isFull()
private boolean transferItemsOut()
private boolean isInventoryFull(IInventory inventoryIn, EnumFacing side)
private static boolean isInventoryEmpty(IInventory inventoryIn, EnumFacing side)
public static boolean pullItems(IHopper hopper)
private static boolean pullItemFromSlot(IHopper hopper, IInventory inventoryIn, int index, EnumFacing direction)
public 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, @Nullable EnumFacing direction)
private static boolean canInsertItemInSlot(IInventory inventoryIn, ItemStack stack, int index, EnumFacing side)
private static boolean canExtractItemFromSlot(IInventory inventoryIn, ItemStack stack, int index, EnumFacing side)
private static ItemStack insertStack(IInventory source, IInventory destination, ItemStack stack, int index, EnumFacing direction)
private IInventory getInventoryForHopperTransfer()
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 void setTransferCooldown(int ticks)
private boolean isOnTransferCooldown()
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()