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.Event
ChunkWatchEvent is fired when an event involving a chunk being watched occurs.
If a method utilizes thisEvent
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.
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 class
ChunkWatchEvent.UnWatch
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 innet.minecraft.world.server.ChunkManager#setChunkLoadedAtClient
.static class
ChunkWatchEvent.Watch
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 innet.minecraft.world.server.ChunkManager#setChunkLoadedAtClient
.
-
Field Summary
Fields Modifier and Type Field Description private ServerPlayerEntity
player
private ChunkPos
pos
private ServerWorld
world
-
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 ServerPlayerEntity
getPlayer()
ChunkPos
getPos()
ServerWorld
getWorld()
-
-
-
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()
-
-