public class HopperTileEntity extends LockableLootTileEntity implements IHopper, ITickableTileEntity
lootTable, lootTableSeedpos, removed, worldBLOCK_ABOVE_SHAPE, COLLECTION_AREA_SHAPE, INSIDE_BOWL_SHAPEINFINITE_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
EntityItems 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, setLootTablecanUnlock, getCapability, getCustomName, getDisplayName, getName, remove, setCustomNameaddInfoToCrashReport, create, getBlockState, getDistanceSq, getMaxRenderDistanceSquared, getPos, getTileData, getType, getUpdatePacket, getUpdateTag, getWorld, hasWorld, isRemoved, markDirty, mirror, onlyOpsCanSetNbt, receiveClientEvent, rotate, setPos, setWorldAndPos, updateContainingBlockInfo, validate, warnInvalidBlockareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCapsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCollectionArea, getWorldcloseInventory, count, getInventoryStackLimit, getStackInSlot, hasAny, isEmpty, isItemValidForSlot, isUsableByPlayer, markDirty, openInventory, removeStackFromSlotclear, clearObjhasCustomNamecanRenderBreaking, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, hasFastRenderer, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTgetCapabilitypublic void read(CompoundNBT compound)
read クラス内 LockableTileEntitypublic CompoundNBT write(CompoundNBT compound)
write クラス内 LockableTileEntitypublic int getSizeInventory()
getSizeInventory インタフェース内 IInventorypublic ItemStack decrStackSize(int index, int count)
decrStackSize インタフェース内 IInventorydecrStackSize クラス内 LockableLootTileEntitypublic void setInventorySlotContents(int index,
ItemStack stack)
setInventorySlotContents インタフェース内 IInventorysetInventorySlotContents クラス内 LockableLootTileEntityprotected ITextComponent getDefaultName()
getDefaultName クラス内 LockableTileEntitypublic void tick()
tick インタフェース内 ITickableTileEntitypublic 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 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 クラス内 LockableLootTileEntityprotected void setItems(NonNullList<ItemStack> itemsIn)
setItems クラス内 LockableLootTileEntitypublic void onEntityCollision(Entity p_200113_1_)
protected Container createMenu(int id, PlayerInventory player)
createMenu クラス内 LockableTileEntityprotected IItemHandler createUnSidedHandler()
createUnSidedHandler クラス内 LockableTileEntitypublic long getLastUpdateTime()