public class ChunkWatchEvent extends Event
Event
as its parameter, the method will
receive every child event of this class.chunk
contains the ChunkPos of the Chunk this event is affecting.player
contains the EntityPlayer that is involved with this chunk being watched. chunkInstance
contains the instance of the Chunk. 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 PlayerChunkMapEntry.removePlayer(EntityPlayerMP) . |
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 PlayerChunkMapEntry.addPlayer(EntityPlayerMP) and PlayerChunkMapEntry.sendToPlayers() . |
Event.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
private ChunkPos |
chunk
Deprecated.
|
private Chunk |
chunkInstance |
private EntityPlayerMP |
player |
Constructor and Description |
---|
ChunkWatchEvent(Chunk chunk,
EntityPlayerMP player) |
ChunkWatchEvent(ChunkPos chunk,
EntityPlayerMP player)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
ChunkPos |
getChunk()
Deprecated.
|
Chunk |
getChunkInstance()
The affected chunk.
|
EntityPlayerMP |
getPlayer() |
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
@Deprecated private final ChunkPos chunk
private final EntityPlayerMP player
private final Chunk chunkInstance
@Deprecated public ChunkWatchEvent(ChunkPos chunk, EntityPlayerMP player)
public ChunkWatchEvent(Chunk chunk, EntityPlayerMP player)
@Deprecated public ChunkPos getChunk()
public EntityPlayerMP getPlayer()
@Nullable public Chunk getChunkInstance()