Class BlockWithEntity

All Implemented Interfaces:
BlockEntityProvider, ItemConvertible, ToggleableFeature
Direct Known Subclasses:
AbstractBannerBlock, AbstractChestBlock, AbstractFurnaceBlock, AbstractSignBlock, AbstractSkullBlock, BarrelBlock, BeaconBlock, BeehiveBlock, BellBlock, BrewingStandBlock, BrushableBlock, CampfireBlock, ChiseledBookshelfBlock, CommandBlock, ConduitBlock, CrafterBlock, DaylightDetectorBlock, DecoratedPotBlock, DispenserBlock, EnchantingTableBlock, EndGatewayBlock, EndPortalBlock, HopperBlock, JukeboxBlock, LecternBlock, PistonExtensionBlock, SculkCatalystBlock, SculkSensorBlock, SculkShriekerBlock, ShulkerBoxBlock, SpawnerBlock, StructureBlock, TrialSpawnerBlock, VaultBlock

public abstract class BlockWithEntity extends Block implements BlockEntityProvider
A convenience class for a block with a BlockEntity. While blocks with block entity only have to implement BlockEntityProvider and do not have to subclass this, it overrides several methods to delegate its logic to the block entity. However, it is generally easier to just implement BlockEntityProvider.

Subclasses must override getRenderType(net.minecraft.block.BlockState) to render the block entity. By default, all block entities are rendered invisible, which is not intended in most, if not all, cases.

See Also:
Mappings:
Namespace Name
named net/minecraft/block/BlockWithEntity
intermediary net/minecraft/class_2237
official den