public class EntityTracker
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Set<EntityTrackerEntry> |
entries |
private static org.apache.logging.log4j.Logger |
LOGGER |
private int |
maxTrackingDistanceThreshold |
private IntHashMap<EntityTrackerEntry> |
trackedEntityHashTable |
private WorldServer |
world |
Constructor and Description |
---|
EntityTracker(WorldServer theWorldIn) |
Modifier and Type | Method and Description |
---|---|
static long |
getPositionLong(double value) |
java.util.Set<? extends EntityPlayer> |
getTrackingPlayers(Entity entity)
Get all players tracking the given Entity.
|
void |
removePlayerFromTrackers(EntityPlayerMP player) |
void |
sendLeashedEntitiesInChunk(EntityPlayerMP player,
Chunk chunkIn) |
void |
sendToTracking(Entity entityIn,
Packet<?> packetIn) |
void |
sendToTrackingAndSelf(Entity entityIn,
Packet<?> packetIn) |
void |
setViewDistance(int p_187252_1_) |
void |
tick() |
void |
track(Entity entityIn) |
void |
track(Entity entityIn,
int trackingRange,
int updateFrequency) |
void |
track(Entity entityIn,
int trackingRange,
int updateFrequency,
boolean sendVelocityUpdates) |
void |
untrack(Entity entityIn) |
static void |
updateServerPosition(Entity entityIn,
double x,
double y,
double z) |
void |
updateVisibility(EntityPlayerMP player) |
private static final org.apache.logging.log4j.Logger LOGGER
private final WorldServer world
private final java.util.Set<EntityTrackerEntry> entries
private final IntHashMap<EntityTrackerEntry> trackedEntityHashTable
private int maxTrackingDistanceThreshold
public EntityTracker(WorldServer theWorldIn)
public static long getPositionLong(double value)
public static void updateServerPosition(Entity entityIn, double x, double y, double z)
public void track(Entity entityIn)
public void track(Entity entityIn, int trackingRange, int updateFrequency)
public void track(Entity entityIn, int trackingRange, int updateFrequency, boolean sendVelocityUpdates)
public void untrack(Entity entityIn)
public void tick()
public void updateVisibility(EntityPlayerMP player)
public java.util.Set<? extends EntityPlayer> getTrackingPlayers(Entity entity)
entity
- the Entitypublic void removePlayerFromTrackers(EntityPlayerMP player)
public void sendLeashedEntitiesInChunk(EntityPlayerMP player, Chunk chunkIn)
public void setViewDistance(int p_187252_1_)