Class BlockEntityCapabilityRegistrar<BE extends net.minecraft.world.level.block.entity.BlockEntity>

java.lang.Object
org.cyclops.cyclopscore.capability.registrar.BlockEntityCapabilityRegistrar<BE>

public abstract class BlockEntityCapabilityRegistrar<BE extends net.minecraft.world.level.block.entity.BlockEntity> extends Object
Helper class for registering block entity capabilities. This is mainly useful for hierarchies of block entity classes with overriding capabilities.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockEntityCapabilityRegistrar(Supplier<net.minecraft.world.level.block.entity.BlockEntityType<? extends BE>> blockEntityType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final <T, C> void
    add(net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability, net.neoforged.neoforge.capabilities.ICapabilityProvider<? super BE,C,T> provider)
     
    abstract void
     
    final void
    register(net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent event)
     

    Methods inherited from class java.lang.Object

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

    • BlockEntityCapabilityRegistrar

      public BlockEntityCapabilityRegistrar(Supplier<net.minecraft.world.level.block.entity.BlockEntityType<? extends BE>> blockEntityType)
  • Method Details

    • populate

      public abstract void populate()
    • add

      public final <T, C> void add(net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability, net.neoforged.neoforge.capabilities.ICapabilityProvider<? super BE,C,T> provider)
    • register

      public final void register(net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent event)