Class ChunkEvent.Load
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.LevelEvent
net.neoforged.neoforge.event.level.ChunkEvent<LevelChunk>
net.neoforged.neoforge.event.level.ChunkEvent.Load
- Enclosing class:
ChunkEvent<T extends ChunkAccess>
This event is fired after Minecraft loads a
LevelChunk into the level, on both the client and server.
Specifically, this is fired during chunk loading in ChunkStatusTasks.full(net.minecraft.world.level.chunk.status.WorldGenContext, net.minecraft.world.level.chunk.status.ChunkStep, net.minecraft.util.StaticCache2D<net.minecraft.server.level.GenerationChunkHolder>, net.minecraft.world.level.chunk.ChunkAccess), and when the client receives a chunk from the server.
Note: On the server, this event is fired before the underlying LevelChunk is promoted to ChunkStatus.FULL.
Interactions with the level must be delayed until the next game tick to prevent deadlocking the game.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.level.ChunkEvent
ChunkEvent.Load, ChunkEvent.UnloadNested classes/interfaces inherited from class net.neoforged.neoforge.event.level.LevelEvent
LevelEvent.CreateSpawnPosition, LevelEvent.PotentialSpawns, LevelEvent.Save -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if this is a newly-generated chunk, instead of one loaded from disk.Methods inherited from class net.neoforged.neoforge.event.level.ChunkEvent
getChunkMethods inherited from class net.neoforged.neoforge.event.level.LevelEvent
getLevel
-
Field Details
-
newChunk
private final boolean newChunk
-
-
Constructor Details
-
Load
-
-
Method Details
-
isNewChunk
public boolean isNewChunk()Returns true if this is a newly-generated chunk, instead of one loaded from disk.- Returns:
- true if this is a newly-generated chunk, instead of one loaded from disk
-