Interface IForgeBlockEntity
- All Superinterfaces:
- ICapabilityProvider,- ICapabilitySerializable<CompoundTag>,- INBTSerializable<CompoundTag>
- All Known Implementing Classes:
- AbstractFurnaceBlockEntity,- BannerBlockEntity,- BarrelBlockEntity,- BaseContainerBlockEntity,- BeaconBlockEntity,- BedBlockEntity,- BeehiveBlockEntity,- BellBlockEntity,- BlastFurnaceBlockEntity,- BlockEntity,- BrewingStandBlockEntity,- BrushableBlockEntity,- CalibratedSculkSensorBlockEntity,- CampfireBlockEntity,- ChestBlockEntity,- ChiseledBookShelfBlockEntity,- CommandBlockEntity,- ComparatorBlockEntity,- ConduitBlockEntity,- DaylightDetectorBlockEntity,- DecoratedPotBlockEntity,- DispenserBlockEntity,- DropperBlockEntity,- EnchantmentTableBlockEntity,- EnderChestBlockEntity,- FluidHandlerBlockEntity,- FurnaceBlockEntity,- HangingSignBlockEntity,- HopperBlockEntity,- JigsawBlockEntity,- JukeboxBlockEntity,- LecternBlockEntity,- PistonMovingBlockEntity,- RandomizableContainerBlockEntity,- SculkCatalystBlockEntity,- SculkSensorBlockEntity,- SculkShriekerBlockEntity,- ShulkerBoxBlockEntity,- SignBlockEntity,- SkullBlockEntity,- SmokerBlockEntity,- SpawnerBlockEntity,- StructureBlockEntity,- TheEndGatewayBlockEntity,- TheEndPortalBlockEntity,- TrappedChestBlockEntity
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final AABBSometimes default render bounding box: infinite in scope.
- 
Method SummaryModifier and TypeMethodDescriptiondefault voiddefault @NotNull ModelDataAllows you to return additional model data.Gets aCompoundTagthat can be used to store custom data for this block entity.default AABBReturn anAABBthat controls the visible scope of aBlockEntityWithoutLevelRendererassociated with thisBlockEntityDefaults to the collision bounding boxBlockBehaviour.BlockStateBase.getCollisionShape(BlockGetter, BlockPos)associated with the block at this location.default voidCalled when the chunk's TE update tag, gotten fromBlockEntity.getUpdateTag(), is received on the client.default booleanhasCustomOutlineRendering(Player player) Returns whether thisBlockEntityhas custom outline rendering behavior.default voiddefault voidCalled when you receive a TileEntityData packet for the location this TileEntity is currently in.default voidonLoad()Called when this is first added to the world (byLevelChunk.addAndRegisterBlockEntity(BlockEntity)) or right before the first tick when the chunk is generated or loaded from disk.default voidRequests a refresh for the model data of your TE Call this every time yourgetModelData()changesprivate BlockEntityself()default CompoundTagMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvidergetCapability, getCapability
- 
Field Details- 
INFINITE_EXTENT_AABBSometimes default render bounding box: infinite in scope. Used to control rendering onBlockEntityWithoutLevelRenderer.
 
- 
- 
Method Details- 
self
- 
deserializeNBT- Specified by:
- deserializeNBTin interface- INBTSerializable<CompoundTag>
 
- 
serializeNBT- Specified by:
- serializeNBTin interface- INBTSerializable<CompoundTag>
 
- 
onDataPacketCalled when you receive a TileEntityData packet for the location this TileEntity is currently in. On the client, the NetworkManager will always be the remote server. On the server, it will be whomever is responsible for sending the packet.- Parameters:
- net- The NetworkManager the packet originated from
- pkt- The data packet
 
- 
handleUpdateTagCalled when the chunk's TE update tag, gotten fromBlockEntity.getUpdateTag(), is received on the client.Used to handle this tag in a special way. By default this simply calls BlockEntity.load(CompoundTag).- Parameters:
- tag- The- CompoundTagsent from- BlockEntity.getUpdateTag()
 
- 
getPersistentDataCompoundTag getPersistentData()Gets aCompoundTagthat can be used to store custom data for this block entity. It will be written, and read from disc, so it persists over world saves.- Returns:
- A compound tag for custom persistent data
 
- 
onChunkUnloadeddefault void onChunkUnloaded()
- 
onLoaddefault void onLoad()Called when this is first added to the world (byLevelChunk.addAndRegisterBlockEntity(BlockEntity)) or right before the first tick when the chunk is generated or loaded from disk. Override instead of addingif (firstTick)stuff in update.
- 
getRenderBoundingBoxReturn anAABBthat controls the visible scope of aBlockEntityWithoutLevelRendererassociated with thisBlockEntityDefaults to the collision bounding boxBlockBehaviour.BlockStateBase.getCollisionShape(BlockGetter, BlockPos)associated with the block at this location.- Returns:
- an appropriately size AABBfor theBlockEntity
 
- 
requestModelDataUpdatedefault void requestModelDataUpdate()Requests a refresh for the model data of your TE Call this every time yourgetModelData()changes
- 
getModelDataAllows you to return additional model data. This data can be used to provide additional functionality in yourBakedModelYou need to schedule a refresh of you model data viarequestModelDataUpdate()if the result of this function changes. Note that this method may be called on a chunk render thread instead of the main client thread- Returns:
- Your model data
 
- 
hasCustomOutlineRenderingReturns whether thisBlockEntityhas custom outline rendering behavior.- Parameters:
- player- the local player currently viewing this- BlockEntity
- Returns:
- trueto enable outline processing
 
 
-