diff options
Diffstat (limited to 'src/Java/gtPlusPlus/GTplusplus.java')
-rw-r--r-- | src/Java/gtPlusPlus/GTplusplus.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index 4d7643e0b0..6ea182f472 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -43,7 +43,9 @@ import gtPlusPlus.core.util.minecraft.*; import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.core.util.sys.GeoUtils; import gtPlusPlus.core.util.sys.NetworkUtils; +import gtPlusPlus.core.util.sys.SystemUtils; import gtPlusPlus.plugin.manager.Core_Manager; +import gtPlusPlus.xmod.gregtech.api.objects.GregtechBufferThread; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; @@ -160,19 +162,26 @@ public class GTplusplus implements ActionListener { } @EventHandler - public void serverStarting(final FMLServerStartingEvent event) { + public synchronized void serverStarting(final FMLServerStartingEvent event) { event.registerServerCommand(new CommandMath()); tryPatchTurbineTextures(); } @Mod.EventHandler - public void serverStopping(final FMLServerStoppingEvent event) { + public synchronized void serverStopping(final FMLServerStoppingEvent event) { //Chunkload Handler if (ChunkManager.mChunkLoaderManagerMap.size() > 0) { Logger.INFO("Clearing Chunk Loaders."); ChunkManager.clearInternalMaps(); } + if (GregtechBufferThread.mBufferThreadAllocation.size() > 0) { + for (GregtechBufferThread i : GregtechBufferThread.mBufferThreadAllocation.values()) { + i.destroy(); + } + SystemUtils.invokeGC(); + } + } @Override @@ -300,7 +309,7 @@ public class GTplusplus implements ActionListener { } String[] machineName = new String[] {"Centrifuge", "Electrolyzer", "Vacuum Freezer"}; for (int i=0;i<3;i++) { - Logger.INFO("[Recipe] Generated "+mValidCount[i]+" recipes for the Industrial "+machineName+". The original machine can process "+mOriginalCount[i]+" recipes, meaning "+mInvalidCount[i]+" are invalid for this Multiblock's processing in some way."); + Logger.INFO("[Recipe] Generated "+mValidCount[i]+" recipes for the Industrial "+machineName[i]+". The original machine can process "+mOriginalCount[i]+" recipes, meaning "+mInvalidCount[i]+" are invalid for this Multiblock's processing in some way."); } } |