diff --git a/gradle.properties b/gradle.properties index c349a7fe0..42181f6a0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,5 +6,5 @@ mod_version=1.98.2 # Minecraft properties (update mods.toml when changing) mc_version=1.17.1 mapping_version=2021.08.15 -forge_version=37.0.34 +forge_version=37.0.69 # NO SERIOUSLY, UPDATE mods.toml WHEN CHANGING diff --git a/src/main/java/dan200/computercraft/shared/Registry.java b/src/main/java/dan200/computercraft/shared/Registry.java index 798f20c53..9ebb38d70 100644 --- a/src/main/java/dan200/computercraft/shared/Registry.java +++ b/src/main/java/dan200/computercraft/shared/Registry.java @@ -82,7 +82,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.Material; import net.minecraft.world.level.storage.loot.predicates.LootItemConditionType; -import net.minecraftforge.common.capabilities.CapabilityManager; +import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.IEventBus; @@ -353,6 +353,13 @@ public final class Registry ); } + @SubscribeEvent + public static void registerCapabilities( RegisterCapabilitiesEvent event ) + { + event.register( IWiredElement.class ); + event.register( IPeripheral.class ); + } + @SubscribeEvent public static void init( FMLCommonSetupEvent event ) { @@ -382,10 +389,6 @@ public final class Registry return null; } ); - // Register capabilities - CapabilityManager.INSTANCE.register( IWiredElement.class ); - CapabilityManager.INSTANCE.register( IPeripheral.class ); - // Register generic capabilities. This can technically be done off-thread, but we need it to happen // after Forge's common setup, so this is easiest. ComputerCraftAPI.registerGenericCapability( CapabilityItemHandler.ITEM_HANDLER_CAPABILITY ); diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 5c85a97e8..f04ee4275 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -20,6 +20,6 @@ CC: Tweaked is a fork of ComputerCraft, adding programmable computers, turtles a [[dependencies.computercraft]] modId="forge" mandatory=true - versionRange="[37.0.25,38)" + versionRange="[37.0.69,38)" ordering="NONE" side="BOTH"