public class HopperTileEntity extends LockableLootTileEntity implements IHopper, ITickableTileEntity
lootTable, lootTableSeed
pos, removed, world
BLOCK_ABOVE_SHAPE, COLLECTION_AREA_SHAPE, INSIDE_BOWL_SHAPE
INFINITE_EXTENT_AABB
コンストラクタと説明 |
---|
HopperTileEntity() |
修飾子とタイプ | メソッドと説明 |
---|---|
static boolean |
captureItem(IInventory p_200114_0_,
ItemEntity p_200114_1_) |
protected Container |
createMenu(int id,
PlayerInventory player) |
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<ItemEntity> |
getCaptureItems(IHopper p_200115_0_) |
protected ITextComponent |
getDefaultName() |
static IInventory |
getInventoryAtPosition(World p_195484_0_,
BlockPos p_195484_1_) |
static IInventory |
getInventoryAtPosition(World worldIn,
double x,
double y,
double z)
Returns the IInventory (if applicable) of the TileEntity at the specified position
|
protected NonNullList<ItemStack> |
getItems() |
long |
getLastUpdateTime() |
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 |
mayTransfer() |
void |
onEntityCollision(Entity p_200113_1_) |
static boolean |
pullItems(IHopper hopper)
Pull dropped
EntityItem s from the world above the hopper and items
from any inventory attached to this hopper into the hopper's inventory. |
static ItemStack |
putStackInInventoryAllSlots(IInventory source,
IInventory destination,
ItemStack stack,
Direction direction)
Attempts to place the passed stack in the inventory, using as many slots as required.
|
void |
read(CompoundNBT compound) |
void |
setInventorySlotContents(int index,
ItemStack stack)
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
|
protected void |
setItems(NonNullList<ItemStack> itemsIn) |
void |
setTransferCooldown(int ticks) |
void |
tick() |
CompoundNBT |
write(CompoundNBT compound) |
canOpen, checkLootAndRead, checkLootAndWrite, clear, createMenu, fillWithLoot, getStackInSlot, isEmpty, isUsableByPlayer, removeStackFromSlot, setLootTable, setLootTable
canUnlock, getCapability, getCustomName, getDisplayName, getName, remove, setCustomName
addInfoToCrashReport, create, getBlockState, getDistanceSq, getMaxRenderDistanceSquared, getPos, getTileData, getType, getUpdatePacket, getUpdateTag, getWorld, hasWorld, isRemoved, markDirty, mirror, onlyOpsCanSetNbt, receiveClientEvent, rotate, setPos, setWorldAndPos, updateContainingBlockInfo, validate, warnInvalidBlock
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCollectionArea, getWorld
closeInventory, count, getInventoryStackLimit, getStackInSlot, hasAny, isEmpty, isItemValidForSlot, isUsableByPlayer, markDirty, openInventory, removeStackFromSlot
clear, clearObj
hasCustomName
canRenderBreaking, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, hasFastRenderer, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
getCapability
public void read(CompoundNBT compound)
read
クラス内 LockableTileEntity
public CompoundNBT write(CompoundNBT compound)
write
クラス内 LockableTileEntity
public int getSizeInventory()
getSizeInventory
インタフェース内 IInventory
public ItemStack decrStackSize(int index, int count)
decrStackSize
インタフェース内 IInventory
decrStackSize
クラス内 LockableLootTileEntity
public void setInventorySlotContents(int index, ItemStack stack)
setInventorySlotContents
インタフェース内 IInventory
setInventorySlotContents
クラス内 LockableLootTileEntity
protected ITextComponent getDefaultName()
getDefaultName
クラス内 LockableTileEntity
public void tick()
tick
インタフェース内 ITickableTileEntity
public static boolean pullItems(IHopper hopper)
EntityItem
s 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 captureItem(IInventory p_200114_0_, ItemEntity p_200114_1_)
public static ItemStack putStackInInventoryAllSlots(@Nullable IInventory source, IInventory destination, ItemStack stack, @Nullable Direction direction)
@Nullable public static IInventory getSourceInventory(IHopper hopper)
public static java.util.List<ItemEntity> getCaptureItems(IHopper p_200115_0_)
@Nullable public static IInventory getInventoryAtPosition(World p_195484_0_, BlockPos p_195484_1_)
@Nullable 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()
protected NonNullList<ItemStack> getItems()
getItems
クラス内 LockableLootTileEntity
protected void setItems(NonNullList<ItemStack> itemsIn)
setItems
クラス内 LockableLootTileEntity
public void onEntityCollision(Entity p_200113_1_)
protected Container createMenu(int id, PlayerInventory player)
createMenu
クラス内 LockableTileEntity
protected IItemHandler createUnSidedHandler()
createUnSidedHandler
クラス内 LockableTileEntity
public long getLastUpdateTime()