Package net.minecraftforge.event.world
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.EventChunkWatchEvent is fired when an event involving a chunk being watched occurs.
If a method utilizes thisEventas its parameter, the method will receive every child event of this class.
poscontains the ChunkPos of the Chunk this event is affecting.
worldcontains the World of the Chunk this event is affecting.
playercontains the EntityPlayer that is involved with this chunk being watched.
Theplayer'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 theMinecraftForge#EVENT_BUS.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChunkWatchEvent.UnWatchChunkWatchEvent.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 innet.minecraft.world.server.ChunkManager#setChunkLoadedAtClient.static classChunkWatchEvent.WatchChunkWatchEvent.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 innet.minecraft.world.server.ChunkManager#setChunkLoadedAtClient.
-
Field Summary
Fields Modifier and Type Field Description private ServerPlayerEntityplayerprivate ChunkPosposprivate ServerWorldworld
-
Constructor Summary
Constructors Constructor Description ChunkWatchEvent(ServerPlayerEntity player, ChunkPos pos, ServerWorld world)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerPlayerEntitygetPlayer()ChunkPosgetPos()ServerWorldgetWorld()
-
-
-
Field Detail
-
world
private final ServerWorld world
-
player
private final ServerPlayerEntity player
-
pos
private final ChunkPos pos
-
-
Constructor Detail
-
ChunkWatchEvent
public ChunkWatchEvent(ServerPlayerEntity player, ChunkPos pos, ServerWorld world)
-
-
Method Detail
-
getPlayer
public ServerPlayerEntity getPlayer()
-
getPos
public ChunkPos getPos()
-
getWorld
public ServerWorld getWorld()
-
-