Class ChunkEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.world.WorldEvent
net.minecraftforge.event.world.ChunkEvent
Direct Known Subclasses:
ChunkDataEvent, ChunkEvent.Load, ChunkEvent.Unload

public class ChunkEvent extends WorldEvent
ChunkEvent is fired when an event involving a chunk occurs.
If a method utilizes this Event as its parameter, the method will receive every child event of this class.

chunk contains the Chunk this event is affecting.

All children of this event are fired on the MinecraftForge.EVENT_BUS.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    ChunkEvent.Load is fired when vanilla Minecraft attempts to load a Chunk into the world.
    This event is fired during chunk loading in
    ChunkProviderClient#loadChunk(int, int),
    Chunk.onChunkLoad().
    static class 
    ChunkEvent.Unload is fired when vanilla Minecraft attempts to unload a Chunk from the world.
    This event is fired during chunk unloading in
    Chunk.onChunkUnload().

    Nested classes/interfaces inherited from class net.minecraftforge.event.world.WorldEvent

    WorldEvent.CreateSpawnPosition, WorldEvent.PotentialSpawns, WorldEvent.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 IChunk
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ChunkEvent(IChunk chunk, IWorld world)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     

    Methods inherited from class net.minecraftforge.event.world.WorldEvent

    getWorld

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

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

    Methods inherited from class java.lang.Object

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

    • chunk

      private final IChunk chunk
  • Constructor Details

    • ChunkEvent

      public ChunkEvent(IChunk chunk)
    • ChunkEvent

      public ChunkEvent(IChunk chunk, IWorld world)
  • Method Details

    • getChunk

      public IChunk getChunk()