Skip to content

Commit

Permalink
Fix capabilities being registered too late
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Jun 21, 2024
1 parent 8688aca commit 5894c06
Showing 1 changed file with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import org.apache.logging.log4j.Level;
import org.cyclops.cyclopscore.config.ConfigHandler;
import org.cyclops.cyclopscore.init.ModBaseVersionable;
Expand Down Expand Up @@ -30,6 +29,13 @@ public class IntegratedDynamicsCompat extends ModBaseVersionable<IntegratedDynam

public IntegratedDynamicsCompat(IEventBus modEventBus) {
super(Reference.MOD_ID, (instance) -> _instance = instance, modEventBus);

// Capabilities
getCapabilityConstructorRegistry().registerBlockEntity(RegistryEntries.BLOCK_ENTITY_DRYING_BASIN, new WorkerDryingBasinBlockEntityCompat());
getCapabilityConstructorRegistry().registerBlockEntity(RegistryEntries.BLOCK_ENTITY_SQUEEZER, new WorkerSqueezerBlockEntityCompat());
getCapabilityConstructorRegistry().registerBlockEntity(RegistryEntries.BLOCK_ENTITY_COAL_GENERATOR, new WorkerCoalGeneratorBlockEntityCompat());
getCapabilityConstructorRegistry().registerBlockEntity(RegistryEntries.BLOCK_ENTITY_MECHANICAL_DRYING_BASIN, new WorkerMechanicalMachineBlockEntityCompat<>());
getCapabilityConstructorRegistry().registerBlockEntity(RegistryEntries.BLOCK_ENTITY_MECHANICAL_SQUEEZER, new WorkerMechanicalMachineBlockEntityCompat<>());
}

@Override
Expand All @@ -51,18 +57,6 @@ protected void loadModCompats(ModCompatLoader modCompatLoader) {
// modCompatLoader.addModCompat(new SignalsModCompat());
}

@Override
protected void setup(FMLCommonSetupEvent event) {
// Capabilities
getCapabilityConstructorRegistry().registerBlockEntity(RegistryEntries.BLOCK_ENTITY_DRYING_BASIN, new WorkerDryingBasinBlockEntityCompat());
getCapabilityConstructorRegistry().registerBlockEntity(RegistryEntries.BLOCK_ENTITY_SQUEEZER, new WorkerSqueezerBlockEntityCompat());
getCapabilityConstructorRegistry().registerBlockEntity(RegistryEntries.BLOCK_ENTITY_COAL_GENERATOR, new WorkerCoalGeneratorBlockEntityCompat());
getCapabilityConstructorRegistry().registerBlockEntity(RegistryEntries.BLOCK_ENTITY_MECHANICAL_DRYING_BASIN, new WorkerMechanicalMachineBlockEntityCompat<>());
getCapabilityConstructorRegistry().registerBlockEntity(RegistryEntries.BLOCK_ENTITY_MECHANICAL_SQUEEZER, new WorkerMechanicalMachineBlockEntityCompat<>());

super.setup(event);
}

@Override
protected IClientProxy constructClientProxy() {
return new ClientProxy();
Expand Down

0 comments on commit 5894c06

Please sign in to comment.