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, lootTableSeed
blockType, 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, setLootTable
getCapability, getDisplayName, getLockCode, hasCapability, isLocked, setLockCode
addInfoToCrashReport, 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, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, closeInventory, getField, getFieldCount, getStackInSlot, isItemValidForSlot, isUsableByPlayer, markDirty, openInventory, removeStackFromSlot, setField
getDisplayName, hasCustomName
private NonNullList<ItemStack> inventory
private int transferCooldown
private long tickedGameTime
public static void registerFixesHopper(DataFixer fixer)
public void readFromNBT(NBTTagCompound compound)
readFromNBT
in class TileEntityLockable
public NBTTagCompound writeToNBT(NBTTagCompound compound)
writeToNBT
in class TileEntityLockable
public int getSizeInventory()
getSizeInventory
in interface IInventory
public ItemStack decrStackSize(int index, int count)
decrStackSize
in interface IInventory
decrStackSize
in class TileEntityLockableLoot
public void setInventorySlotContents(int index, ItemStack stack)
setInventorySlotContents
in interface IInventory
setInventorySlotContents
in class TileEntityLockableLoot
public java.lang.String getName()
getName
in interface IWorldNameable
public int getInventoryStackLimit()
getInventoryStackLimit
in interface IInventory
protected boolean updateHopper()
private boolean isInventoryEmpty()
public boolean isEmpty()
isEmpty
in interface IInventory
private 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 TileEntityLockable
public 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 IInteractionObject
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
createContainer
in interface IInteractionObject
protected NonNullList<ItemStack> getItems()
getItems
in class TileEntityLockableLoot
public long getLastUpdateTime()