public class PlayerChunkMap
extends java.lang.Object
Constructor and Description |
---|
PlayerChunkMap(WorldServer serverWorld) |
Modifier and Type | Method and Description |
---|---|
void |
addPlayer(EntityPlayerMP player)
Adds an EntityPlayerMP to the PlayerManager and to all player instances within player visibility
|
boolean |
contains(int chunkX,
int chunkZ) |
void |
entryChanged(PlayerChunkMapEntry entry)
Marks an entry as dirty
|
java.util.Iterator<Chunk> |
getChunkIterator() |
PlayerChunkMapEntry |
getEntry(int x,
int z) |
static int |
getFurthestViewableBlock(int distance)
Get the furthest viewable block given player's view distance
|
WorldServer |
getWorldServer()
Returns the WorldServer associated with this PlayerManager
|
boolean |
isPlayerWatchingChunk(EntityPlayerMP player,
int chunkX,
int chunkZ) |
void |
markBlockForUpdate(BlockPos pos) |
void |
removeEntry(PlayerChunkMapEntry entry) |
void |
removePlayer(EntityPlayerMP player)
Removes an EntityPlayerMP from the PlayerManager.
|
void |
setPlayerViewRadius(int radius) |
void |
tick()
updates all the player instances that need to be updated
|
void |
updateMovingPlayer(EntityPlayerMP player)
Update chunks around a player that moved
|
public PlayerChunkMap(WorldServer serverWorld)
public WorldServer getWorldServer()
public java.util.Iterator<Chunk> getChunkIterator()
public void tick()
public boolean contains(int chunkX, int chunkZ)
public PlayerChunkMapEntry getEntry(int x, int z)
public void markBlockForUpdate(BlockPos pos)
public void addPlayer(EntityPlayerMP player)
public void removePlayer(EntityPlayerMP player)
public void updateMovingPlayer(EntityPlayerMP player)
public boolean isPlayerWatchingChunk(EntityPlayerMP player, int chunkX, int chunkZ)
public void setPlayerViewRadius(int radius)
public static int getFurthestViewableBlock(int distance)
public void entryChanged(PlayerChunkMapEntry entry)
public void removeEntry(PlayerChunkMapEntry entry)