类 ChestBlockEntity
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.ChestBlockEntity
- 所有已实现的接口:
Clearable
,Container
,MenuConstructor
,LidBlockEntity
,MenuProvider
,Nameable
,RandomizableContainer
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,IForgeBlockEntity
- 直接已知子类:
TrappedChestBlockEntity
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
从类继承的嵌套类/接口 net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
字段概要
字段修饰符和类型字段说明private LazyOptional
<IItemHandlerModifiable> private final ChestLidController
private static final int
private NonNullList
<ItemStack> private final ContainerOpenersCounter
从类继承的字段 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
-
构造器概要
构造器限定符构造器说明ChestBlockEntity
(BlockPos p_155331_, BlockState p_155332_) protected
ChestBlockEntity
(BlockEntityType<?> p_155327_, BlockPos p_155328_, BlockState p_155329_) -
方法概要
修饰符和类型方法说明private IItemHandlerModifiable
protected AbstractContainerMenu
createMenu
(int p_59082_, Inventory p_59083_) <T> LazyOptional
<T> getCapability
(Capability<T> cap, Direction side) Retrieves the Optional handler for the capability requested on the specific side.int
protected Component
protected NonNullList
<ItemStack> getItems()
static int
getOpenCount
(BlockGetter p_59087_, BlockPos p_59088_) float
getOpenNess
(float p_59080_) void
static void
lidAnimateTick
(Level p_155344_, BlockPos p_155345_, BlockState p_155346_, ChestBlockEntity p_155347_) protected void
loadAdditional
(CompoundTag p_331054_, HolderLookup.Provider p_334909_) (专用程序包) static void
playSound
(Level p_155339_, BlockPos p_155340_, BlockState p_155341_, SoundEvent p_155342_) void
protected void
saveAdditional
(CompoundTag p_187489_, HolderLookup.Provider p_328166_) void
setBlockState
(BlockState p_155251_) protected void
setItems
(NonNullList<ItemStack> p_59110_) protected void
signalOpenCount
(Level p_155333_, BlockPos p_155334_, BlockState p_155335_, int p_155336_, int p_155337_) void
void
static void
swapContents
(ChestBlockEntity p_59104_, ChestBlockEntity p_59105_) boolean
triggerEvent
(int p_59114_, int p_59115_) 从类继承的方法 net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getItem, getLootTable, getLootTableSeed, isEmpty, removeComponentsFromTag, removeItem, removeItemNoUpdate, setItem, setLootTable, setLootTableSeed
从类继承的方法 net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, clearContent, createUnSidedHandler, getCustomName, getDisplayName, getName, 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
从类继承的方法 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, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, stillValid
从接口继承的方法 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
-
字段详细资料
-
EVENT_SET_OPEN_COUNT
private static final int EVENT_SET_OPEN_COUNT- 另请参阅:
-
items
-
openersCounter
-
chestLidController
-
chestHandler
-
-
构造器详细资料
-
ChestBlockEntity
-
ChestBlockEntity
-
-
方法详细资料
-
getContainerSize
public int getContainerSize()- 指定者:
getContainerSize
在接口中Container
-
getDefaultName
- 指定者:
getDefaultName
在类中BaseContainerBlockEntity
-
loadAdditional
-
saveAdditional
-
lidAnimateTick
public static void lidAnimateTick(Level p_155344_, BlockPos p_155345_, BlockState p_155346_, ChestBlockEntity p_155347_) -
playSound
static void playSound(Level p_155339_, BlockPos p_155340_, BlockState p_155341_, SoundEvent p_155342_) -
triggerEvent
public boolean triggerEvent(int p_59114_, int p_59115_) - 覆盖:
triggerEvent
在类中BlockEntity
-
startOpen
-
stopOpen
-
getItems
- 指定者:
getItems
在类中BaseContainerBlockEntity
-
setItems
- 指定者:
setItems
在类中BaseContainerBlockEntity
-
getOpenNess
public float getOpenNess(float p_59080_) - 指定者:
getOpenNess
在接口中LidBlockEntity
-
getOpenCount
-
swapContents
-
createMenu
- 指定者:
createMenu
在类中BaseContainerBlockEntity
-
recheckOpen
public void recheckOpen() -
signalOpenCount
protected void signalOpenCount(Level p_155333_, BlockPos p_155334_, BlockState p_155335_, int p_155336_, int p_155337_) -
setBlockState
- 覆盖:
setBlockState
在类中BlockEntity
-
getCapability
从接口复制的说明:ICapabilityProvider
Retrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- 指定者:
getCapability
在接口中ICapabilityProvider
- 覆盖:
getCapability
在类中BaseContainerBlockEntity
- 参数:
cap
- The capability to checkside
- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'- 返回:
- The requested an optional holding the requested capability.
-
createHandler
-
invalidateCaps
public void invalidateCaps()- 指定者:
invalidateCaps
在接口中ICapabilityProviderImpl<BlockEntity>
- 覆盖:
invalidateCaps
在类中BaseContainerBlockEntity
-