Package net.minecraftforge.event.world
Class ChunkDataEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.world.WorldEvent
-
- net.minecraftforge.event.world.ChunkEvent
-
- net.minecraftforge.event.world.ChunkDataEvent
-
- Direct Known Subclasses:
ChunkDataEvent.Load
,ChunkDataEvent.Save
public class ChunkDataEvent extends ChunkEvent
ChunkDataEvent is fired when an event involving chunk data occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
data
contains the NBTTagCompound containing the chunk data for this event.
All children of this event are fired on theMinecraftForge.EVENT_BUS
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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 {@link net.minecraft.world.chunk.storage.ChunkSerializer.read(ServerWorld, TemplateManager, PointOfInterestManager, ChunkPos, CompoundNBT)} which means it is async, so be careful.
This event is notCancelable
.
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 inAnvilChunkLoader#saveChunk(World, Chunk)
.-
Nested classes/interfaces inherited from class net.minecraftforge.event.world.ChunkEvent
ChunkEvent.Unload
-
Nested classes/interfaces inherited from class net.minecraftforge.event.world.WorldEvent
WorldEvent.CreateSpawnPosition, WorldEvent.PotentialSpawns
-
-
Field Summary
Fields Modifier and Type Field Description private CompoundNBT
data
-
Constructor Summary
Constructors Constructor Description ChunkDataEvent(IChunk chunk, CompoundNBT data)
ChunkDataEvent(IChunk chunk, IWorld world, CompoundNBT data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompoundNBT
getData()
-
Methods inherited from class net.minecraftforge.event.world.ChunkEvent
getChunk
-
Methods inherited from class net.minecraftforge.event.world.WorldEvent
getWorld
-
-
-
-
Field Detail
-
data
private final CompoundNBT data
-
-
Constructor Detail
-
ChunkDataEvent
public ChunkDataEvent(IChunk chunk, CompoundNBT data)
-
ChunkDataEvent
public ChunkDataEvent(IChunk chunk, IWorld world, CompoundNBT data)
-
-
Method Detail
-
getData
public CompoundNBT getData()
-
-