generated from tilera/1710mod
fix: invalidate AuraManager between world loading
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
307713ea1a
commit
491360a906
|
@ -6,6 +6,9 @@ import cpw.mods.fml.common.SidedProxy;
|
|||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStoppedEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
@ -13,6 +16,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import dev.tilera.auracore.api.Aspects;
|
||||
import dev.tilera.auracore.aura.AuraCalculationThread;
|
||||
import dev.tilera.auracore.aura.AuraDeleteThread;
|
||||
import dev.tilera.auracore.aura.AuraManager;
|
||||
import dev.tilera.auracore.aura.AuraUpdateThread;
|
||||
import dev.tilera.auracore.aura.AuraWorldTicker;
|
||||
import dev.tilera.auracore.client.GUITicker;
|
||||
|
@ -91,4 +95,14 @@ public class AuraCore {
|
|||
ThaumcraftApi.registerObjectTag(new ItemStack(ConfigBlocks.blockCustomOre, 1, 10), new AspectList().add(Aspect.EARTH, 1).add(Aspect.TAINT, 3).add(Aspect.CRYSTAL, 2));
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onServerLoad(FMLServerAboutToStartEvent event) {
|
||||
AuraManager.invalidate();
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onServerStop(FMLServerStoppedEvent event) {
|
||||
AuraManager.invalidate();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -50,6 +50,18 @@ public class AuraManager {
|
|||
public static Object saveLock = new Object();
|
||||
public static NodeIdStorage nodeIdStore = null;
|
||||
|
||||
public static void invalidate() {
|
||||
auraNodes.clear();;
|
||||
auraUpdateList.clear();
|
||||
nodeNeighbours.clear();;
|
||||
nodeChunks.clear();
|
||||
markedForTransmission.clear();;
|
||||
fluxEventList.clear();
|
||||
auraCalcQueue.clear();
|
||||
auraDeleteQueue.clear();
|
||||
auraUpdateQueue.clear();
|
||||
}
|
||||
|
||||
public static int registerAuraNode(World world, short lvl, EnumNodeType type, int dim, int x, int y, int z) {
|
||||
return registerAuraNode(world, lvl, type, dim, x, y, z, false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue