diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/gregtech/GT_Mod.java | 5 | ||||
-rw-r--r-- | src/main/java/gregtech/common/GT_Proxy.java | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 5ea006b5cb..3ad586d63c 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -995,6 +995,11 @@ public class GT_Mod implements IGT_Mod { } @Mod.EventHandler + public void onServerAboutToStart(FMLServerAboutToStartEvent aEvent){ + gregtechproxy.onServerAboutToStart(); + } + + @Mod.EventHandler public void onServerStarting(FMLServerStartingEvent aEvent) { try { for (Runnable tRunnable : GregTech_API.sBeforeGTServerstart) { diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 533a13436b..855367f5ff 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -29,6 +29,7 @@ import gregtech.common.gui.GT_GUIContainerVolumetricFlask; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.items.armor.ModularArmor_Item; import gregtech.common.items.armor.gui.*; +import ic2.api.reactor.IReactor; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; @@ -215,6 +216,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean gt6Cable = true; public boolean ic2EnergySourceCompat = true; public boolean costlyCableConnection = false; + public final HashSet<IReactor> reactorsDone=new HashSet<>(); public GT_Proxy() { GameRegistry.registerFuelHandler(this); @@ -581,6 +583,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } } + public void onServerAboutToStart(){ + dimensionWiseChunkData.clear();//!!! IMPORTANT for map switching... + dimensionWisePollution.clear();//!!! IMPORTANT for map switching... + } + public void onServerStarting() { GT_Log.out.println("GT_Mod: ServerStarting-Phase started!"); GT_Log.ore.println("GT_Mod: ServerStarting-Phase started!"); @@ -602,9 +609,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } } } catch (Throwable e) {e.printStackTrace(GT_Log.err);} - - dimensionWiseChunkData.clear();//!!! IMPORTANT for map switching... - dimensionWisePollution.clear();//!!! IMPORTANT for map switching... } public void onServerStarted() { @@ -1230,6 +1234,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { @SubscribeEvent public void onServerTickEvent(TickEvent.ServerTickEvent aEvent) { + reactorsDone.clear(); } @SubscribeEvent |