List of usage examples for net.minecraftforge.event.world ChunkEvent.Unload getChunk
public IChunk getChunk()
From source file:appeng.server.subcommands.ChunkLogger.java
License:Open Source License
@SubscribeEvent public void onChunkUnloadEvent(ChunkEvent.Unload unload) { if (!unload.world.isRemote) { AELog.info("Chunk Unloaded: " + unload.getChunk().xPosition + ", " + unload.getChunk().zPosition); this.displayStack(); }/*from w w w. j ava2s .c o m*/ }
From source file:com.builtbroken.atomic.map.MapHandler.java
@SubscribeEvent public void onChunkUnload(ChunkEvent.Unload event) //Only called if chunk unloads separate from world unload { RADIATION_MAP.onChunkUnload(event.world, event.getChunk()); MATERIAL_MAP.onChunkUnload(event.world, event.getChunk()); THERMAL_MAP.onChunkUnload(event.world, event.getChunk()); }
From source file:hellfirepvp.astralsorcery.common.starlight.network.TransmissionChunkTracker.java
License:Open Source License
@SubscribeEvent public void onChUnload(ChunkEvent.Unload event) { TransmissionWorldHandler handle = StarlightTransmissionHandler.getInstance() .getWorldHandler(event.getWorld()); if (handle != null) { Chunk ch = event.getChunk(); handle.informChunkUnload(new ChunkPos(ch.xPosition, ch.zPosition)); }/*from ww w . j a v a 2s . co m*/ }
From source file:hellfirepvp.astralsorcery.common.world.retrogen.ChunkVersionController.java
License:Open Source License
@SubscribeEvent public void onChUnload(ChunkEvent.Unload ev) { if (ev.getChunk().getWorld().isRemote) return;/*from ww w .ja va2 s . c o m*/ ChunkPos cp = ev.getChunk().getPos(); //To be fair. We don't expect the dequeue to ever get bigger than 1-2 entries... //If it does, someone REALLY MESSED UP. if (!queuedSaveBuffer.contains(cp)) { queuedSaveBuffer.add(cp); } }