Class BlockWithEntity

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

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
official cjg
intermediary net/minecraft/class_2237
named net/minecraft/block/BlockWithEntity
  • Constructor Details

    • BlockWithEntity

      protected BlockWithEntity(AbstractBlock.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcvn;<init>(Lcvn$c;)V
      intermediary <init> Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V
      named <init> Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
  • Method Details