类 HopperBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
net.minecraft.world.level.block.entity.HopperBlockEntity
- 所有已实现的接口:
Clearable
,Container
,MenuConstructor
,Hopper
,MenuProvider
,Nameable
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
字段概要
字段修饰符和类型字段说明private int
static final int
private NonNullList<ItemStack>
static final int
private long
从类继承的字段 net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG, lootTable, lootTableSeed
从类继承的字段 net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
从接口继承的字段 net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
从接口继承的字段 net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ItemStack
static boolean
addItem
(Container pContainer, ItemEntity pItem) private static boolean
canMergeItems
(ItemStack pStack1, ItemStack pStack2) private static boolean
canPlaceItemInContainer
(Container pContainer, ItemStack pStack, int pSlot, Direction pDirection) private static boolean
canTakeItemFromContainer
(Container pSource, Container pDestination, ItemStack pStack, int pSlot, Direction pDirection) protected AbstractContainerMenu
createMenu
(int pId, Inventory pPlayer) protected IItemHandler
private static boolean
ejectItems
(Level pLevel, BlockPos pPos, BlockState pState, HopperBlockEntity pSourceContainer) static void
entityInside
(Level pLevel, BlockPos pPos, BlockState pState, Entity pEntity, HopperBlockEntity pBlockEntity) private static Container
getAttachedContainer
(Level pLevel, BlockPos pPos, BlockState pState) private static Container
getContainerAt
(Level pLevel, double pX, double pY, double pZ) static Container
getContainerAt
(Level pLevel, BlockPos pPos) int
protected Component
protected NonNullList<ItemStack>
getItems()
static List<ItemEntity>
getItemsAtAndAbove
(Level pLevel, Hopper pHopper) long
double
double
double
private static IntStream
private static Container
getSourceContainer
(Level pLevel, Hopper pHopper) private boolean
private static boolean
isEmptyContainer
(Container pContainer, Direction pDirection) private static boolean
isFullContainer
(Container pContainer, Direction pDirection) private boolean
boolean
void
load
(CompoundTag pTag) static void
pushItemsTick
(Level pLevel, BlockPos pPos, BlockState pState, HopperBlockEntity pBlockEntity) removeItem
(int pIndex, int pCount) protected void
saveAdditional
(CompoundTag pTag) void
setCooldown
(int pCooldownTime) void
protected void
setItems
(NonNullList<ItemStack> pItems) static boolean
suckInItems
(Level pLevel, Hopper pHopper) private static ItemStack
tryMoveInItem
(Container pSource, Container pDestination, ItemStack pStack, int pSlot, Direction pDirection) private static boolean
tryMoveItems
(Level pLevel, BlockPos pPos, BlockState pState, HopperBlockEntity pBlockEntity, BooleanSupplier pValidator) private static boolean
tryTakeInItemFromSlot
(Hopper pHopper, Container pContainer, int pSlot, Direction pDirection) 从类继承的方法 net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
canOpen, clearContent, createMenu, getItem, isEmpty, removeItemNoUpdate, setLootTable, setLootTable, stillValid, tryLoadLootTable, trySaveLootTable, unpackLootTable
从类继承的方法 net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, reviveCaps, setCustomName
从类继承的方法 net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent
从类继承的方法 net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.world.Clearable
clearContent
从接口继承的方法 net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getItem, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItemNoUpdate, setChanged, startOpen, stillValid, stopOpen
从接口继承的方法 net.minecraft.world.level.block.entity.Hopper
getSuckShape
从接口继承的方法 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
从接口继承的方法 net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
从接口继承的方法 net.minecraft.world.Nameable
hasCustomName
-
字段详细资料
-
构造器详细资料
-
HopperBlockEntity
-
-
方法详细资料
-
load
- 覆盖:
load
在类中BaseContainerBlockEntity
-
saveAdditional
-
getContainerSize
public int getContainerSize()- 指定者:
getContainerSize
在接口中Container
-
removeItem
- 指定者:
removeItem
在接口中Container
- 覆盖:
removeItem
在类中RandomizableContainerBlockEntity
-
setItem
- 指定者:
setItem
在接口中Container
- 覆盖:
setItem
在类中RandomizableContainerBlockEntity
-
getDefaultName
- 指定者:
getDefaultName
在类中BaseContainerBlockEntity
-
pushItemsTick
public static void pushItemsTick(Level pLevel, BlockPos pPos, BlockState pState, HopperBlockEntity pBlockEntity) -
tryMoveItems
private static boolean tryMoveItems(Level pLevel, BlockPos pPos, BlockState pState, HopperBlockEntity pBlockEntity, BooleanSupplier pValidator) -
inventoryFull
private boolean inventoryFull() -
ejectItems
private static boolean ejectItems(Level pLevel, BlockPos pPos, BlockState pState, HopperBlockEntity pSourceContainer) -
getSlots
-
isFullContainer
-
isEmptyContainer
-
suckInItems
-
tryTakeInItemFromSlot
-
addItem
-
addItem
-
canPlaceItemInContainer
-
canTakeItemFromContainer
-
tryMoveInItem
-
getAttachedContainer
@Nullable private static Container getAttachedContainer(Level pLevel, BlockPos pPos, BlockState pState) -
getSourceContainer
-
getItemsAtAndAbove
-
getContainerAt
-
getContainerAt
-
canMergeItems
-
getLevelX
public double getLevelX() -
getLevelY
public double getLevelY() -
getLevelZ
public double getLevelZ() -
setCooldown
public void setCooldown(int pCooldownTime) -
isOnCooldown
private boolean isOnCooldown() -
isOnCustomCooldown
public boolean isOnCustomCooldown() -
getItems
- 指定者:
getItems
在类中RandomizableContainerBlockEntity
-
setItems
- 指定者:
setItems
在类中RandomizableContainerBlockEntity
-
entityInside
public static void entityInside(Level pLevel, BlockPos pPos, BlockState pState, Entity pEntity, HopperBlockEntity pBlockEntity) -
createMenu
- 指定者:
createMenu
在类中BaseContainerBlockEntity
-
createUnSidedHandler
-
getLastUpdateTime
public long getLastUpdateTime()
-