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
ConstructorDescriptionBlockEntityCapabilityRegistrar
(Supplier<net.minecraft.world.level.block.entity.BlockEntityType<? extends BE>> blockEntityType) -
Method Summary
Modifier and TypeMethodDescriptionfinal <T,
C> void add
(net.neoforged.neoforge.capabilities.BlockCapability<T, C> capability, net.neoforged.neoforge.capabilities.ICapabilityProvider<? super BE, C, T> provider) abstract void
populate()
final void
register
(net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent event)
-
Constructor Details
-
BlockEntityCapabilityRegistrar
-
-
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)
-