Class ChunkWatchEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.world.ChunkWatchEvent
Direct Known Subclasses:
ChunkWatchEvent.UnWatch, ChunkWatchEvent.Watch

public class ChunkWatchEvent extends net.minecraftforge.eventbus.api.Event
ChunkWatchEvent is fired when an event involving a chunk being watched occurs.
If a method utilizes this Event as its parameter, the method will receive every child event of this class.

pos contains the ChunkPos of the Chunk this event is affecting.
world contains the World of the Chunk this event is affecting.
player contains the EntityPlayer that is involved with this chunk being watched.

The player's world may not be the same as the world of the chunk when the player is teleporting to another dimension.

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

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    ChunkWatchEvent.UnWatch is fired when an EntityPlayer stops watching a chunk.
    This event is fired when a chunk is removed from the watched chunks of an EntityPlayer in net.minecraft.server.level.ChunkMap#updateChunkTracking(ServerPlayer, ChunkPos, Packet[], boolean, boolean).
    static class 
    ChunkWatchEvent.Watch is fired when an EntityPlayer begins watching a chunk.
    This event is fired when a chunk is added to the watched chunks of an EntityPlayer in net.minecraft.server.level.ChunkMap#updateChunkTracking(ServerPlayer, ChunkPos, Packet[], boolean, boolean).

    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 ServerPlayer
     
    private ChunkPos
     
    private ServerLevel
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     

    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