diff options
author | GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> | 2023-01-22 04:02:09 +0000 |
---|---|---|
committer | GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> | 2023-01-22 04:02:09 +0000 |
commit | 1fece28d41ca3cce1f251700bc101551d071fc99 (patch) | |
tree | bd4e8273102b2f2570bcd2d2179c7d532c9093ab /src/main | |
parent | 66e5e765627abbaf8952a6ede776451b172bb7a1 (diff) | |
download | GT5-Unofficial-1fece28d41ca3cce1f251700bc101551d071fc99.tar.gz GT5-Unofficial-1fece28d41ca3cce1f251700bc101551d071fc99.tar.bz2 GT5-Unofficial-1fece28d41ca3cce1f251700bc101551d071fc99.zip |
Move event to server load
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/github/technus/tectech/TecTech.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java index cd51a532d3..80f7108e2d 100644 --- a/src/main/java/com/github/technus/tectech/TecTech.java +++ b/src/main/java/com/github/technus/tectech/TecTech.java @@ -36,7 +36,11 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.Collection; import java.util.Iterator; + +import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; +import pers.gwyog.gtneioreplugin.plugin.block.BlockDimensionDisplay; +import pers.gwyog.gtneioreplugin.plugin.block.ModBlocks; @Mod( modid = Reference.MODID, @@ -232,6 +236,12 @@ public class TecTech { pEvent.registerServerCommand(new ChargeCommand()); pEvent.registerServerCommand(new MassCommand()); } + + // This must be done after game load otherwise it fails. + eyeOfHarmonyRecipeStorage = new EyeOfHarmonyRecipeStorage(); + // The reason we do this is to force the fields inside the class to instantiate at world load so NEI + // displays properly. + eyeOfHarmonyRecipeStorage.recipeLookUp(new ItemStack(ModBlocks.blocks.get("Ow"))); } public static EyeOfHarmonyRecipeStorage eyeOfHarmonyRecipeStorage = null; @@ -240,8 +250,5 @@ public class TecTech { public void onServerAboutToStart(FMLServerAboutToStartEvent aEvent) { chunkDataHandler.clearData(); playerPersistence.clearData(); - - // This must be done after game load otherwise it fails. - eyeOfHarmonyRecipeStorage = new EyeOfHarmonyRecipeStorage(); } } |