Class 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
- All Implemented Interfaces:
- Clearable,- Container,- MenuConstructor,- LidBlockEntity,- MenuProvider,- Nameable,- ICapabilityProvider,- ICapabilityProviderImpl<BlockEntity>,- ICapabilitySerializable<CompoundTag>,- IForgeBlockEntity,- INBTSerializable<CompoundTag>
- Direct Known Subclasses:
- TrappedChestBlockEntity
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProviderCapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate LazyOptional<IItemHandlerModifiable>private final ChestLidControllerprivate static final intprivate NonNullList<ItemStack>private final ContainerOpenersCounterFields inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntityLOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG, lootTable, lootTableSeedFields inherited from class net.minecraft.world.level.block.entity.BlockEntitylevel, remove, worldPositionFields inherited from interface net.minecraft.world.ContainerDEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZEFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntityINFINITE_EXTENT_AABB
- 
Constructor SummaryConstructorsModifierConstructorDescriptionChestBlockEntity(BlockPos p_155331_, BlockState p_155332_) protectedChestBlockEntity(BlockEntityType<?> p_155327_, BlockPos p_155328_, BlockState p_155329_) 
- 
Method SummaryModifier and TypeMethodDescriptionprivate IItemHandlerModifiableprotected AbstractContainerMenucreateMenu(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.intprotected Componentprotected NonNullList<ItemStack>getItems()static intgetOpenCount(BlockGetter p_59087_, BlockPos p_59088_) floatgetOpenNess(float p_59080_) voidstatic voidlidAnimateTick(Level p_155344_, BlockPos p_155345_, BlockState p_155346_, ChestBlockEntity p_155347_) voidload(CompoundTag p_155349_) (package private) static voidplaySound(Level p_155339_, BlockPos p_155340_, BlockState p_155341_, SoundEvent p_155342_) voidprotected voidsaveAdditional(CompoundTag p_187489_) voidsetBlockState(BlockState p_155251_) protected voidsetItems(NonNullList<ItemStack> p_59110_) protected voidsignalOpenCount(Level p_155333_, BlockPos p_155334_, BlockState p_155335_, int p_155336_, int p_155337_) voidvoidstatic voidswapContents(ChestBlockEntity p_59104_, ChestBlockEntity p_59105_) booleantriggerEvent(int p_59114_, int p_59115_) Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntitycanOpen, clearContent, createMenu, getItem, isEmpty, removeItem, removeItemNoUpdate, setItem, setLootTable, setLootTable, stillValid, tryLoadLootTable, trySaveLootTable, unpackLootTableMethods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntitycanUnlock, createUnSidedHandler, getCustomName, getDisplayName, getName, reviveCaps, setCustomNameMethods inherited from class net.minecraft.world.level.block.entity.BlockEntityaddEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setChanged, setChanged, setLevel, setRemovedMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProviderareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCapsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.ContainercanPlaceItem, canTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf, setChangedMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvidergetCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntitydeserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTMethods inherited from interface net.minecraft.world.NameablehasCustomName
- 
Field Details- 
EVENT_SET_OPEN_COUNTprivate static final int EVENT_SET_OPEN_COUNT- See Also:
 
- 
items
- 
openersCounter
- 
chestLidController
- 
chestHandler
 
- 
- 
Constructor Details- 
ChestBlockEntity
- 
ChestBlockEntity
 
- 
- 
Method Details- 
getContainerSizepublic int getContainerSize()- Specified by:
- getContainerSizein interface- Container
 
- 
getDefaultName- Specified by:
- getDefaultNamein class- BaseContainerBlockEntity
 
- 
load- Overrides:
- loadin class- BaseContainerBlockEntity
 
- 
saveAdditional- Overrides:
- saveAdditionalin class- BaseContainerBlockEntity
 
- 
lidAnimateTickpublic static void lidAnimateTick(Level p_155344_, BlockPos p_155345_, BlockState p_155346_, ChestBlockEntity p_155347_) 
- 
playSoundstatic void playSound(Level p_155339_, BlockPos p_155340_, BlockState p_155341_, SoundEvent p_155342_) 
- 
triggerEventpublic boolean triggerEvent(int p_59114_, int p_59115_) - Overrides:
- triggerEventin class- BlockEntity
 
- 
startOpen
- 
stopOpen
- 
getItems- Specified by:
- getItemsin class- RandomizableContainerBlockEntity
 
- 
setItems- Specified by:
- setItemsin class- RandomizableContainerBlockEntity
 
- 
getOpenNesspublic float getOpenNess(float p_59080_) - Specified by:
- getOpenNessin interface- LidBlockEntity
 
- 
getOpenCount
- 
swapContents
- 
createMenu- Specified by:
- createMenuin class- BaseContainerBlockEntity
 
- 
setBlockState- Overrides:
- setBlockStatein class- BlockEntity
 
- 
getCapabilityDescription copied from interface:ICapabilityProviderRetrieves 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.- Specified by:
- getCapabilityin interface- ICapabilityProvider
- Overrides:
- getCapabilityin class- BaseContainerBlockEntity
- Parameters:
- cap- The capability to check
- side- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'
- Returns:
- The requested an optional holding the requested capability.
 
- 
createHandler
- 
invalidateCapspublic void invalidateCaps()- Specified by:
- invalidateCapsin interface- ICapabilityProviderImpl<BlockEntity>
- Overrides:
- invalidateCapsin class- BaseContainerBlockEntity
 
- 
recheckOpenpublic void recheckOpen()
- 
signalOpenCountprotected void signalOpenCount(Level p_155333_, BlockPos p_155334_, BlockState p_155335_, int p_155336_, int p_155337_) 
 
-