public class ChunkDataEvent extends ChunkEvent
Event
as its parameter, the method will
receive every child event of this class.data
contains the NBTTagCompound containing the chunk data for this event.MinecraftForge.EVENT_BUS
.Modifier and Type | Class and Description |
---|---|
static class |
ChunkDataEvent.Load
ChunkDataEvent.Load is fired when vanilla Minecraft attempts to load Chunk data.
This event is fired during chunk loading in net.minecraft.world.chunk.storage.ChunkSerializer.read(ServerWorld, TemplateManager, PointOfInterestManager, ChunkPos, CompoundNBT) which means it is async, so be careful.This event is not Cancelable .This event does not have a result. |
static class |
ChunkDataEvent.Save
ChunkDataEvent.Save is fired when vanilla Minecraft attempts to save Chunk data.
This event is fired during chunk saving in AnvilChunkLoader#saveChunk(World, Chunk) . |
ChunkEvent.Unload
WorldEvent.CreateSpawnPosition, WorldEvent.PotentialSpawns
Modifier and Type | Field and Description |
---|---|
private CompoundNBT |
data |
Constructor and Description |
---|
ChunkDataEvent(IChunk chunk,
CompoundNBT data) |
ChunkDataEvent(IChunk chunk,
IWorld world,
CompoundNBT data) |
Modifier and Type | Method and Description |
---|---|
CompoundNBT |
getData() |
getChunk
getWorld
private final CompoundNBT data
public ChunkDataEvent(IChunk chunk, CompoundNBT data)
public ChunkDataEvent(IChunk chunk, IWorld world, CompoundNBT data)
public CompoundNBT getData()