From b26912f2e88f9adaf643b6fd839a0eb84687835c Mon Sep 17 00:00:00 2001 From: UselessBullets <80850784+UselessBullets@users.noreply.github.com> Date: Sun, 22 Oct 2023 13:38:17 -0500 Subject: [PATCH] HalpLibe loads first This should fix the items and blocks being null for every single mod that uses halplibe as a dependency --- src/main/java/turniplabs/halplibe/HalpLibe.java | 8 +++++++- src/main/resources/fabric.mod.json | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/turniplabs/halplibe/HalpLibe.java b/src/main/java/turniplabs/halplibe/HalpLibe.java index 8a2734f..d755ab7 100644 --- a/src/main/java/turniplabs/halplibe/HalpLibe.java +++ b/src/main/java/turniplabs/halplibe/HalpLibe.java @@ -1,6 +1,7 @@ package turniplabs.halplibe; import net.fabricmc.api.ModInitializer; +import net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import turniplabs.halplibe.helper.*; @@ -10,7 +11,7 @@ import java.io.File; import java.util.Properties; -public class HalpLibe implements ModInitializer { +public class HalpLibe implements ModInitializer, PreLaunchEntrypoint { public static final String MOD_ID = "halplibe"; public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); static { @@ -32,4 +33,9 @@ public void onInitialize() { AchievementHelper.addPage(VANILLA_ACHIEVEMENTS); LOGGER.info("HalpLibe initialized."); } + + @Override + public void onPreLaunch() { + // Initializes halp statics first + } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index cdf220a..d2a3daa 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -19,6 +19,9 @@ "entrypoints": { "main": [ "turniplabs.halplibe.HalpLibe" + ], + "preLaunch": [ + "turniplabs.halplibe.HalpLibe" ] }, "mixins": [