From baddb4c0aa2fac918873ff28160b15a31cbacb9f Mon Sep 17 00:00:00 2001 From: chochem <40274384+chochem@users.noreply.github.com> Date: Sun, 8 Sep 2024 10:29:36 +0100 Subject: [PATCH 1/4] make sure to init fluids in preinit --- src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java | 2 ++ .../com/github/bartimaeusnek/cropspp/fluids/CppFluids.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java b/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java index c3d86b1..36ef71d 100644 --- a/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java +++ b/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java @@ -39,6 +39,7 @@ import com.github.bartimaeusnek.cropspp.GTHandler.machines.CropWeedPicker; import com.github.bartimaeusnek.cropspp.commands.EnableDebug; import com.github.bartimaeusnek.cropspp.croploader.CropLoader; +import com.github.bartimaeusnek.cropspp.fluids.CppFluids; import com.github.bartimaeusnek.cropspp.items.CppItems; import cpw.mods.fml.common.Mod; @@ -226,6 +227,7 @@ public void preInit(FMLPreInitializationEvent preinit) { CropItemList.cropWeedPicker .set(new CropWeedPicker(12528, "Basic CropWeedPicker", "Basic CropWeedPicker", 1).getStackForm(1)); + new CppFluids(); CppItems.register_Items(); CppItems.OreDictItems(); diff --git a/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java b/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java index 2bf22d3..7590db6 100644 --- a/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java +++ b/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java @@ -12,4 +12,8 @@ public class CppFluids { public static final AlkoholImpure GHP = new AlkoholImpure("potion.GHP", 700, "potion.vodka"); public static final AlkoholImpure jagi = new AlkoholImpure("potion.jagi", 100000, "potion.alcopops"); public static final AlkoholImpure njagi = new AlkoholImpure("potion.njagi", 350, "potion.alcopops"); + + public CppFluids() { + super(); + } } From 3fbc2d7806be765aa63335dfa552faf248fa55a7 Mon Sep 17 00:00:00 2001 From: Caedis Date: Sun, 8 Sep 2024 04:41:26 -0500 Subject: [PATCH 2/4] change to empty init method (tested with latest nightly pack) --- src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java | 4 +++- .../com/github/bartimaeusnek/cropspp/fluids/CppFluids.java | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java b/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java index 36ef71d..b15eaea 100644 --- a/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java +++ b/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java @@ -28,6 +28,7 @@ import static gregtech.api.enums.MetaTileEntityIDs.cropSynthesiserUV; import static gregtech.api.enums.MetaTileEntityIDs.cropSynthesiserZPM; +import com.github.bartimaeusnek.cropspp.fluids.CppFluids; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -227,10 +228,11 @@ public void preInit(FMLPreInitializationEvent preinit) { CropItemList.cropWeedPicker .set(new CropWeedPicker(12528, "Basic CropWeedPicker", "Basic CropWeedPicker", 1).getStackForm(1)); - new CppFluids(); + CppFluids.register_Fluids(); CppItems.register_Items(); CppItems.OreDictItems(); + } @EventHandler diff --git a/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java b/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java index 7590db6..3d7df4e 100644 --- a/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java +++ b/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java @@ -13,7 +13,6 @@ public class CppFluids { public static final AlkoholImpure jagi = new AlkoholImpure("potion.jagi", 100000, "potion.alcopops"); public static final AlkoholImpure njagi = new AlkoholImpure("potion.njagi", 350, "potion.alcopops"); - public CppFluids() { - super(); - } + /// This method intentionally left blank to instantiate the static fields + public static void register_Fluids(){} } From b999893ba8e5194762a1bbc0e876ebba13ff5f5b Mon Sep 17 00:00:00 2001 From: Caedis Date: Sun, 8 Sep 2024 04:42:15 -0500 Subject: [PATCH 3/4] spotless --- src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java | 1 - .../java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java b/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java index b15eaea..218cec3 100644 --- a/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java +++ b/src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java @@ -28,7 +28,6 @@ import static gregtech.api.enums.MetaTileEntityIDs.cropSynthesiserUV; import static gregtech.api.enums.MetaTileEntityIDs.cropSynthesiserZPM; -import com.github.bartimaeusnek.cropspp.fluids.CppFluids; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java b/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java index 3d7df4e..d953aad 100644 --- a/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java +++ b/src/main/java/com/github/bartimaeusnek/cropspp/fluids/CppFluids.java @@ -14,5 +14,5 @@ public class CppFluids { public static final AlkoholImpure njagi = new AlkoholImpure("potion.njagi", 350, "potion.alcopops"); /// This method intentionally left blank to instantiate the static fields - public static void register_Fluids(){} + public static void register_Fluids() {} } From a55588a8134d568ac13260b15362148f8b8641db Mon Sep 17 00:00:00 2001 From: Caedis Date: Sun, 8 Sep 2024 04:43:02 -0500 Subject: [PATCH 4/4] update deps while i am at it --- dependencies.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 63c05fa..03fc9e4 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -13,7 +13,7 @@ dependencies { compileOnly("com.github.GTNewHorizons:Natura:2.7.1:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:NewHorizonsCoreMod:2.6.22:dev") { + compileOnly("com.github.GTNewHorizons:NewHorizonsCoreMod:2.6.23:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:Galacticraft:3.2.4-GTNH:dev") { @@ -26,6 +26,6 @@ dependencies { //runtimeOnly("com.github.GTNewHorizons:twilightforest:2.6.33:dev") //runtimeOnly("com.github.GTNewHorizons:TinkersConstruct:1.12.9-GTNH:dev") //runtimeOnly("com.github.GTNewHorizons:Natura:2.7.1:dev") - //runtimeOnly("com.github.GTNewHorizons:NewHorizonsCoreMod:2.6.22:dev") + //runtimeOnly("com.github.GTNewHorizons:NewHorizonsCoreMod:2.6.23:dev") //runtimeOnly("com.github.GTNewHorizons:Galacticraft:3.2.4-GTNH:dev") }