Class ChunkEvent.Load
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.ChunkEvent.Load
- Enclosing class:
ChunkEvent
ChunkEvent.Load is fired when vanilla Minecraft attempts to load a Chunk into the level.
This event is fired during chunk loading in
Chunk.onChunkLoad().
Note: This event may be called before the underlying
This event is not
.
This event does not have a result.
This event is fired on the
This event is fired during chunk loading in
Chunk.onChunkLoad().
Note: This event may be called before the underlying
LevelChunk
is promoted to ChunkStatus.FULL
. You will cause chunk loading deadlocks if you don't delay your level interactions.This event is not
invalid @link
ICancellableEvent
This event does not have a result.
Event.HasResult
This event is fired on the
NeoForge.EVENT_BUS
.-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.level.ChunkEvent
ChunkEvent.Load, ChunkEvent.Unload
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.level.LevelEvent
LevelEvent.CreateSpawnPosition, LevelEvent.PotentialSpawns, LevelEvent.Save
Nested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check whether the Chunk is newly generated, and being loaded for the first time.Methods inherited from class net.neoforged.neoforge.event.level.ChunkEvent
getChunk
Methods inherited from class net.neoforged.neoforge.event.level.LevelEvent
getLevel
Methods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult
-
Field Details
-
newChunk
private final boolean newChunk
-
-
Constructor Details
-
Load
-
-
Method Details
-
isNewChunk
public boolean isNewChunk()Check whether the Chunk is newly generated, and being loaded for the first time.Will only ever return
true
on the logical server.- Returns:
- whether the Chunk is newly generated
-