类 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
,RandomizableContainer
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,IForgeBlockEntity
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
从类继承的嵌套类/接口 net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
字段概要
字段修饰符和类型字段说明private static final int[][]
private int
private Direction
static final int
private NonNullList
<ItemStack> static final int
private long
从类继承的字段 net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
lootTable, lootTableSeed
从类继承的字段 net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
从接口继承的字段 net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
从接口继承的字段 net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
从接口继承的字段 net.minecraft.world.RandomizableContainer
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ItemStack
static boolean
addItem
(Container p_59332_, ItemEntity p_59333_) private static boolean
canMergeItems
(ItemStack p_59345_, ItemStack p_59346_) private static boolean
canPlaceItemInContainer
(Container p_59335_, ItemStack p_59336_, int p_59337_, Direction p_59338_) private static boolean
canTakeItemFromContainer
(Container p_273433_, Container p_273542_, ItemStack p_273400_, int p_273519_, Direction p_273088_) private static int[]
createFlatSlots
(int p_329697_) protected AbstractContainerMenu
createMenu
(int p_59312_, Inventory p_59313_) protected IItemHandler
private static boolean
ejectItems
(Level p_155563_, BlockPos p_155564_, HopperBlockEntity p_329427_) static void
entityInside
(Level p_155568_, BlockPos p_155569_, BlockState p_155570_, Entity p_155571_, HopperBlockEntity p_155572_) private static Container
getAttachedContainer
(Level p_155593_, BlockPos p_155594_, HopperBlockEntity p_331744_) private static Container
getBlockContainer
(Level p_329847_, BlockPos p_329170_, BlockState p_328169_) static Container
getContainerAt
(Level p_59391_, BlockPos p_59392_) private static Container
getContainerAt
(Level p_59348_, BlockPos p_330520_, BlockState p_334938_, double p_59349_, double p_59350_, double p_59351_) int
protected Component
private static Container
getEntityContainer
(Level p_328239_, double p_335152_, double p_336273_, double p_330059_) protected NonNullList
<ItemStack> getItems()
static List
<ItemEntity> getItemsAtAndAbove
(Level p_155590_, Hopper p_155591_) long
double
double
double
private static int[]
private static Container
getSourceContainer
(Level p_155597_, Hopper p_155598_, BlockPos p_330370_, BlockState p_334668_) private boolean
private static boolean
isFullContainer
(Container p_59386_, Direction p_59387_) boolean
private boolean
boolean
protected void
loadAdditional
(CompoundTag p_331195_, HolderLookup.Provider p_329407_) static void
pushItemsTick
(Level p_155574_, BlockPos p_155575_, BlockState p_155576_, HopperBlockEntity p_155577_) removeItem
(int p_59309_, int p_59310_) protected void
saveAdditional
(CompoundTag p_187502_, HolderLookup.Provider p_334921_) void
setBlockState
(BlockState p_334323_) void
setCooldown
(int p_59396_) void
protected void
setItems
(NonNullList<ItemStack> p_59371_) static boolean
suckInItems
(Level p_155553_, Hopper p_155554_) private static ItemStack
tryMoveInItem
(Container p_59321_, Container p_59322_, ItemStack p_59323_, int p_59324_, Direction p_59325_) private static boolean
tryMoveItems
(Level p_155579_, BlockPos p_155580_, BlockState p_155581_, HopperBlockEntity p_155582_, BooleanSupplier p_155583_) private static boolean
tryTakeInItemFromSlot
(Hopper p_59355_, Container p_59356_, int p_59357_, Direction p_59358_) 从类继承的方法 net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getItem, getLootTable, getLootTableSeed, isEmpty, removeComponentsFromTag, removeItemNoUpdate, setLootTable, setLootTableSeed
从类继承的方法 net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, clearContent, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, reviveCaps, stillValid
从类继承的方法 net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onChunkUnloaded, parseCustomNameSafe, saveCustomAndMetadata, saveCustomOnly, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent
从类继承的方法 net.minecraftforge.common.capabilities.CapabilityProvider
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, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItemNoUpdate, setChanged, startOpen, stillValid, stopOpen
从接口继承的方法 net.minecraft.world.level.block.entity.Hopper
getSuckAabb
从接口继承的方法 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
从接口继承的方法 net.minecraftforge.common.extensions.IForgeBlockEntity
getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate
从接口继承的方法 net.minecraft.world.Nameable
hasCustomName
从接口继承的方法 net.minecraft.world.RandomizableContainer
getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTable
-
字段详细资料
-
MOVE_ITEM_SPEED
public static final int MOVE_ITEM_SPEED- 另请参阅:
-
HOPPER_CONTAINER_SIZE
public static final int HOPPER_CONTAINER_SIZE- 另请参阅:
-
CACHED_SLOTS
private static final int[][] CACHED_SLOTS -
items
-
cooldownTime
private int cooldownTime -
tickedGameTime
private long tickedGameTime -
facing
-
-
构造器详细资料
-
HopperBlockEntity
-
-
方法详细资料
-
loadAdditional
-
saveAdditional
-
getContainerSize
public int getContainerSize()- 指定者:
getContainerSize
在接口中Container
-
removeItem
- 指定者:
removeItem
在接口中Container
- 覆盖:
removeItem
在类中RandomizableContainerBlockEntity
-
setItem
- 指定者:
setItem
在接口中Container
- 覆盖:
setItem
在类中RandomizableContainerBlockEntity
-
setBlockState
- 覆盖:
setBlockState
在类中BlockEntity
-
getDefaultName
- 指定者:
getDefaultName
在类中BaseContainerBlockEntity
-
pushItemsTick
public static void pushItemsTick(Level p_155574_, BlockPos p_155575_, BlockState p_155576_, HopperBlockEntity p_155577_) -
tryMoveItems
private static boolean tryMoveItems(Level p_155579_, BlockPos p_155580_, BlockState p_155581_, HopperBlockEntity p_155582_, BooleanSupplier p_155583_) -
inventoryFull
private boolean inventoryFull() -
ejectItems
-
getSlots
-
createFlatSlots
private static int[] createFlatSlots(int p_329697_) -
isFullContainer
-
suckInItems
-
tryTakeInItemFromSlot
-
addItem
-
addItem
-
canPlaceItemInContainer
-
canTakeItemFromContainer
-
tryMoveInItem
-
getAttachedContainer
@Nullable private static Container getAttachedContainer(Level p_155593_, BlockPos p_155594_, HopperBlockEntity p_331744_) -
getSourceContainer
@Nullable private static Container getSourceContainer(Level p_155597_, Hopper p_155598_, BlockPos p_330370_, BlockState p_334668_) -
getItemsAtAndAbove
-
getContainerAt
-
getContainerAt
@Nullable private static Container getContainerAt(Level p_59348_, BlockPos p_330520_, BlockState p_334938_, double p_59349_, double p_59350_, double p_59351_) -
getBlockContainer
@Nullable private static Container getBlockContainer(Level p_329847_, BlockPos p_329170_, BlockState p_328169_) -
getEntityContainer
-
canMergeItems
-
getLevelX
public double getLevelX() -
getLevelY
public double getLevelY() -
getLevelZ
public double getLevelZ() -
isGridAligned
public boolean isGridAligned()- 指定者:
isGridAligned
在接口中Hopper
-
setCooldown
public void setCooldown(int p_59396_) -
isOnCooldown
private boolean isOnCooldown() -
isOnCustomCooldown
public boolean isOnCustomCooldown() -
getItems
- 指定者:
getItems
在类中BaseContainerBlockEntity
-
setItems
- 指定者:
setItems
在类中BaseContainerBlockEntity
-
entityInside
public static void entityInside(Level p_155568_, BlockPos p_155569_, BlockState p_155570_, Entity p_155571_, HopperBlockEntity p_155572_) -
createMenu
- 指定者:
createMenu
在类中BaseContainerBlockEntity
-
createUnSidedHandler
-
getLastUpdateTime
public long getLastUpdateTime()
-