diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/gregtech/GT_Mod.java | 13 | ||||
-rw-r--r-- | src/main/java/gregtech/api/GregTech_API.java | 2 | ||||
-rw-r--r-- | src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 668b47cd6c..45075e6ecf 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -37,6 +37,7 @@ import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLLoadCompleteEvent; import cpw.mods.fml.common.event.FMLModIdMappingEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -567,6 +568,18 @@ public class GT_Mod implements IGT_Mod { } @Mod.EventHandler + public void onLoadComplete(FMLLoadCompleteEvent aEvent) { + for (Runnable tRunnable : GregTech_API.sGTCompleteLoad) { + try { + tRunnable.run(); + } catch (Throwable e) { + e.printStackTrace(GT_Log.err); + } + } + GregTech_API.sGTCompleteLoad = null; + } + + @Mod.EventHandler public void onServerStarted(FMLServerStartedEvent aEvent) { gregtechproxy.onServerStarted(); } diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index 14f448adb3..ce662726b8 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -243,7 +243,7 @@ public class GregTech_API { sAfterGTPostload = new ArrayList<>(), sFirstWorldTick = new ArrayList<>(), sBeforeGTServerstart = new ArrayList<>(), sAfterGTServerstart = new ArrayList<>(), sBeforeGTServerstop = new ArrayList<>(), sAfterGTServerstop = new ArrayList<>(), - sGTBlockIconload = new ArrayList<>(), sGTItemIconload = new ArrayList<>(); + sGTBlockIconload = new ArrayList<>(), sGTItemIconload = new ArrayList<>(), sGTCompleteLoad = new ArrayList<>(); /** * The Icon Registers from Blocks and Items. They will get set right before the corresponding Icon Load Phase as * executed in the Runnable List above. diff --git a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java index e5aaecbdde..53dbcb2860 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java @@ -2356,7 +2356,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(OIL, INFINITYCATALYST, 4); // UHV Replicator (UU-Matter) - tMutation.requireResource(GameRegistry.findBlock(GregTech.ID, "gt.blockmachines"), 11003); + GregTech_API.sGTCompleteLoad.add(() -> tMutation.requireResource(GregTech_API.sBlockMachines, 11003)); }), // Noble Gas Line @@ -2566,7 +2566,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { beeSpecies.setHasEffect(); }, template -> AlleleHelper.instance.set(template, LIFESPAN, Lifespan.SHORTEST), dis -> { IBeeMutationCustom tMutation = dis.registerMutation(INFINITYCATALYST, NAQUADRIA, 5); - tMutation.requireResource(GameRegistry.findBlock(GregTech.ID, "gt.blockmachines"), 4684); + tMutation.requireResource(GregTech_API.sBlockMachines, 4684); tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(100, "Deep Dark")); // Deep Dark // dim }); |