public class PlayerChunkMap
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static com.google.common.base.Predicate<EntityPlayerMP> |
CAN_GENERATE_CHUNKS |
private java.util.Set<PlayerChunkMapEntry> |
dirtyEntries |
private java.util.List<PlayerChunkMapEntry> |
entries |
private java.util.List<PlayerChunkMapEntry> |
entriesWithoutChunks |
private it.unimi.dsi.fastutil.longs.Long2ObjectMap<PlayerChunkMapEntry> |
entryMap |
private static com.google.common.base.Predicate<EntityPlayerMP> |
NOT_SPECTATOR |
private java.util.List<PlayerChunkMapEntry> |
pendingSendToPlayers |
private java.util.List<EntityPlayerMP> |
players |
private int |
playerViewRadius |
private long |
previousTotalWorldTime |
private boolean |
sortMissingChunks |
private boolean |
sortSendToPlayers |
private WorldServer |
world |
Constructor and Description |
---|
PlayerChunkMap(WorldServer serverWorld) |
Modifier and Type | Method and Description |
---|---|
void |
addPlayer(EntityPlayerMP player) |
boolean |
contains(int chunkX,
int chunkZ) |
void |
entryChanged(PlayerChunkMapEntry entry) |
java.util.Iterator<Chunk> |
getChunkIterator() |
PlayerChunkMapEntry |
getEntry(int x,
int z) |
static int |
getFurthestViewableBlock(int distance) |
private static long |
getIndex(int p_187307_0_,
int p_187307_1_) |
private PlayerChunkMapEntry |
getOrCreateEntry(int chunkX,
int chunkZ) |
WorldServer |
getWorldServer() |
boolean |
isPlayerWatchingChunk(EntityPlayerMP player,
int chunkX,
int chunkZ) |
void |
markBlockForUpdate(BlockPos pos) |
private void |
markSortPending() |
private boolean |
overlaps(int x1,
int z1,
int x2,
int z2,
int radius) |
void |
removeEntry(PlayerChunkMapEntry entry) |
void |
removePlayer(EntityPlayerMP player) |
void |
setPlayerViewRadius(int radius) |
void |
tick() |
void |
updateMovingPlayer(EntityPlayerMP player) |
private static final com.google.common.base.Predicate<EntityPlayerMP> NOT_SPECTATOR
private static final com.google.common.base.Predicate<EntityPlayerMP> CAN_GENERATE_CHUNKS
private final WorldServer world
private final java.util.List<EntityPlayerMP> players
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<PlayerChunkMapEntry> entryMap
private final java.util.Set<PlayerChunkMapEntry> dirtyEntries
private final java.util.List<PlayerChunkMapEntry> pendingSendToPlayers
private final java.util.List<PlayerChunkMapEntry> entriesWithoutChunks
private final java.util.List<PlayerChunkMapEntry> entries
private int playerViewRadius
private long previousTotalWorldTime
private boolean sortMissingChunks
private boolean sortSendToPlayers
public PlayerChunkMap(WorldServer serverWorld)
public WorldServer getWorldServer()
public java.util.Iterator<Chunk> getChunkIterator()
public void tick()
public boolean contains(int chunkX, int chunkZ)
@Nullable public PlayerChunkMapEntry getEntry(int x, int z)
private PlayerChunkMapEntry getOrCreateEntry(int chunkX, int chunkZ)
public void markBlockForUpdate(BlockPos pos)
public void addPlayer(EntityPlayerMP player)
public void removePlayer(EntityPlayerMP player)
private boolean overlaps(int x1, int z1, int x2, int z2, int radius)
public void updateMovingPlayer(EntityPlayerMP player)
public boolean isPlayerWatchingChunk(EntityPlayerMP player, int chunkX, int chunkZ)
public void setPlayerViewRadius(int radius)
private void markSortPending()
public static int getFurthestViewableBlock(int distance)
private static long getIndex(int p_187307_0_, int p_187307_1_)
public void entryChanged(PlayerChunkMapEntry entry)
public void removeEntry(PlayerChunkMapEntry entry)