Class ChunkEvent.Load

java.lang.Object
net.minecraftforge.eventbus.api.Event
Enclosing class:
ChunkEvent

public static class ChunkEvent.Load extends 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 LevelChunk is promoted to
invalid reference
ChunkStatus#FULL
. You will cause chunk loading deadlocks if you don't delay your level interactions.

This event is not Cancelable.

This event does not have a result. Event.HasResult

This event is fired on the MinecraftForge.EVENT_BUS.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.event.level.ChunkEvent

    ChunkEvent.Load, ChunkEvent.Unload

    Nested classes/interfaces inherited from class net.minecraftforge.event.level.LevelEvent

    LevelEvent.CreateSpawnPosition, LevelEvent.PotentialSpawns, LevelEvent.Save

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Load(ChunkAccess chunk, boolean newChunk)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check whether the Chunk is newly generated, and being loaded for the first time.

    Methods inherited from class net.minecraftforge.event.level.ChunkEvent

    getChunk

    Methods inherited from class net.minecraftforge.event.level.LevelEvent

    getLevel

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • newChunk

      private final boolean newChunk
  • Constructor Details

    • Load

      @Internal public Load(ChunkAccess chunk, boolean newChunk)
  • 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