public class ChunkWatchEvent
extends net.minecraftforge.eventbus.api.Event
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. player
's world may not be the same as the world of the chunk
when the player is teleporting to another dimension.MinecraftForge#EVENT_BUS
.Modifier and Type | Class and 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 in ChunkManager.setChunkLoadedAtClient(net.minecraft.entity.player.ServerPlayerEntity, net.minecraft.util.math.ChunkPos, net.minecraft.network.IPacket<?>[], boolean, boolean) . |
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 in ChunkManager.setChunkLoadedAtClient(net.minecraft.entity.player.ServerPlayerEntity, net.minecraft.util.math.ChunkPos, net.minecraft.network.IPacket<?>[], boolean, boolean) . |
Modifier and Type | Field and Description |
---|---|
private ServerPlayerEntity |
player |
private ChunkPos |
pos |
private ServerWorld |
world |
Constructor and Description |
---|
ChunkWatchEvent(ServerPlayerEntity player,
ChunkPos pos,
ServerWorld world) |
Modifier and Type | Method and Description |
---|---|
ServerPlayerEntity |
getPlayer() |
ChunkPos |
getPos() |
ServerWorld |
getWorld() |
private final ServerWorld world
private final ServerPlayerEntity player
private final ChunkPos pos
public ChunkWatchEvent(ServerPlayerEntity player, ChunkPos pos, ServerWorld world)
public ServerPlayerEntity getPlayer()
public ChunkPos getPos()
public ServerWorld getWorld()