Class ChunkDataEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.LevelEvent
net.neoforged.neoforge.event.level.ChunkEvent
net.neoforged.neoforge.event.level.ChunkDataEvent
- Direct Known Subclasses:
ChunkDataEvent.Load
,ChunkDataEvent.Save
ChunkDataEvent is fired when an event involving chunk data occurs.
If a method utilizes this
All children of this event are fired on the
If a method utilizes this
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.All children of this event are fired on the
NeoForge.EVENT_BUS
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ChunkDataEvent.Load is fired when vanilla Minecraft attempts to load Chunk data.
This event is fired during chunk loading ininvalid reference
ChunkSerializer#read(ServerLevel, PoiManager, ChunkPos, CompoundTag)
This event is notinvalid reference
ICancellableEvent
This event does not have a result.static class
ChunkDataEvent.Save is fired when vanilla Minecraft attempts to save Chunk data.
This event is fired during chunk saving inChunkMap#save(ChunkAccess)
.Nested classes/interfaces inherited from class net.neoforged.neoforge.event.level.ChunkEvent
ChunkEvent.Unload
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.level.LevelEvent
LevelEvent.CreateSpawnPosition, LevelEvent.PotentialSpawns
-
Field Summary
-
Constructor Summary
ConstructorDescriptionChunkDataEvent
(ChunkAccess chunk, CompoundTag data) ChunkDataEvent
(ChunkAccess chunk, LevelAccessor world, CompoundTag data) -
Method Summary
Methods inherited from class net.neoforged.neoforge.event.level.ChunkEvent
getChunk
Methods inherited from class net.neoforged.neoforge.event.level.LevelEvent
getLevel
-
Field Details
-
data
-
-
Constructor Details
-
ChunkDataEvent
-
ChunkDataEvent
-
-
Method Details
-
getData
-