From cc646b41a0e62a47d12f660795219cde8a2a0f0d Mon Sep 17 00:00:00 2001 From: YoungOnion <39562198+YoungOnionMC@users.noreply.github.com> Date: Sat, 12 Oct 2024 18:07:30 -0600 Subject: [PATCH] fix milk crash --- src/main/java/com/gregtechceu/gtceu/common/CommonProxy.java | 3 +-- src/main/java/com/gregtechceu/gtceu/common/data/GTFluids.java | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gregtechceu/gtceu/common/CommonProxy.java b/src/main/java/com/gregtechceu/gtceu/common/CommonProxy.java index 3395a93b96..b39ac2491e 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/CommonProxy.java +++ b/src/main/java/com/gregtechceu/gtceu/common/CommonProxy.java @@ -80,8 +80,6 @@ public class CommonProxy { public CommonProxy() { - ForgeMod.enableMilkFluid(); - // used for forge events (ClientProxy + CommonProxy) IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus(); eventBus.register(this); @@ -127,6 +125,7 @@ public static void init() { GTCompassSections.init(); GTCompassNodes.init(); GTCovers.init(); + ForgeMod.enableMilkFluid(); GTFluids.init(); GTCreativeModeTabs.init(); GTBlocks.init(); diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTFluids.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTFluids.java index 54d91888ec..b41e6f8b43 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTFluids.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTFluids.java @@ -25,7 +25,8 @@ public class GTFluids { public static void init() { handleNonMaterialFluids(GTMaterials.Water, Fluids.WATER); handleNonMaterialFluids(GTMaterials.Lava, Fluids.LAVA); - handleNonMaterialFluids(GTMaterials.Milk, ForgeMod.MILK.get()); + if (ForgeMod.MILK.isPresent()) + handleNonMaterialFluids(GTMaterials.Milk, ForgeMod.MILK.get()); REGISTRATE.creativeModeTab(() -> GTCreativeModeTabs.MATERIAL_FLUID); // register fluids for materials for (MaterialRegistry registry : GTCEuAPI.materialManager.getRegistries()) {