Class BlockEntityTypes

java.lang.Object
net.ixdarklord.coolcatcore.api.registry.BlockEntityTypes

public final class BlockEntityTypes extends Object
Block entity types from common code (vanilla keeps their constructor private).

 public static final RegistryEntry<BlockEntityType<CrateBlockEntity>> CRATE = BLOCK_ENTITIES.register("crate",
         () -> BlockEntityTypes.create(CrateBlockEntity::new, MyBlocks.CRATE.get()));
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    BlockEntityTypes.Factory<T extends net.minecraft.world.level.block.entity.BlockEntity>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends net.minecraft.world.level.block.entity.BlockEntity>
    net.minecraft.world.level.block.entity.BlockEntityType<T>
    create(BlockEntityTypes.Factory<? extends T> factory, net.minecraft.world.level.block.Block... blocks)
    A block entity type for these blocks; register it in Registries.BLOCK_ENTITY_TYPE.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static <T extends net.minecraft.world.level.block.entity.BlockEntity> net.minecraft.world.level.block.entity.BlockEntityType<T> create(BlockEntityTypes.Factory<? extends T> factory, net.minecraft.world.level.block.Block... blocks)
      A block entity type for these blocks; register it in Registries.BLOCK_ENTITY_TYPE.