From 707ada898845cc4277fd0996ad76c0649247916d Mon Sep 17 00:00:00 2001 From: GuyApooye Date: Thu, 19 Dec 2024 20:35:44 +0200 Subject: [PATCH] crash because 2 lines needed to switch places --- .../guyapooye/clockworkadditions/ClockworkAdditions.java | 3 +-- .../clockworkadditions/registries/PartialModelRegistry.java | 2 +- .../clockworkadditions/ClockworkAdditionsFabric.java | 2 +- .../clockworkadditions/ClockworkAdditionsForge.java | 6 ++++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/common/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditions.java b/common/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditions.java index 3bcc17b..b927452 100644 --- a/common/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditions.java +++ b/common/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditions.java @@ -27,7 +27,6 @@ private static void allItems(CreativeModeTab.ItemDisplayParameters var0, Creativ output.accept(BlockRegistry.INVERTED_RESISTOR); } public static void init() { - PlatformUtil.runWhenOn(EnvType.CLIENT, ClockworkAdditionsCLient::init); BlockRegistry.register(); EntityRegistry.register(); BlockEntityRegistry.register(); @@ -42,7 +41,7 @@ public static Component asTranslatable(String translatable) { return Component.translatable(translatable); } - public static class ClockworkAdditionsCLient { + public static class ClockworkAdditionsClient { public static void init() {} } } diff --git a/common/src/main/java/com/github/guyapooye/clockworkadditions/registries/PartialModelRegistry.java b/common/src/main/java/com/github/guyapooye/clockworkadditions/registries/PartialModelRegistry.java index a87a306..86ae0e3 100644 --- a/common/src/main/java/com/github/guyapooye/clockworkadditions/registries/PartialModelRegistry.java +++ b/common/src/main/java/com/github/guyapooye/clockworkadditions/registries/PartialModelRegistry.java @@ -4,7 +4,7 @@ import com.jozufozu.flywheel.core.PartialModel; public class PartialModelRegistry { - public static PartialModel BEARING_TOP = new PartialModel(ClockworkAdditions.asResource("block/kinetic_flap_bearing/top")), + public static final PartialModel BEARING_TOP = new PartialModel(ClockworkAdditions.asResource("block/kinetic_flap_bearing/top")), PEDALS_BASE = new PartialModel(ClockworkAdditions.asResource("block/mechanical_pedals/block")), PEDALS_CRANK = new PartialModel(ClockworkAdditions.asResource("block/mechanical_pedals/crank")), PEDAL_LEFT = new PartialModel(ClockworkAdditions.asResource("block/mechanical_pedals/pedal_left")), diff --git a/fabric/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditionsFabric.java b/fabric/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditionsFabric.java index 9035321..a4a1d46 100644 --- a/fabric/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditionsFabric.java +++ b/fabric/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditionsFabric.java @@ -24,7 +24,7 @@ public void onInitialize() { } public void initClient() { + ClockworkAdditionsClient.init(); ClientEventRegistry.register(); - ClockworkAdditionsCLient.init(); } } \ No newline at end of file diff --git a/forge/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditionsForge.java b/forge/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditionsForge.java index 1b0aeb2..6205e0d 100644 --- a/forge/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditionsForge.java +++ b/forge/src/main/java/com/github/guyapooye/clockworkadditions/ClockworkAdditionsForge.java @@ -23,12 +23,14 @@ public ClockworkAdditionsForge() { TAB_REGISTER.register("general", () -> CWACreativeModeTab); TAB_REGISTER.register(modEventBus); - ClockworkAdditions.init(); PlatformUtilImpl.runWhenOn(Dist.CLIENT, this::initClient); + ClockworkAdditions.init(); ModLoadingContext modLoadingContext = ModLoadingContext.get(); ConfigRegistryImpl.register(modLoadingContext); } - private void initClient() {} + private void initClient() { + ClockworkAdditionsClient.init(); + } } \ No newline at end of file