public class EntityTrackerEntry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
encodedPosX
The encoded entity X position.
|
int |
encodedPosY
The encoded entity Y position.
|
int |
encodedPosZ
The encoded entity Z position.
|
int |
encodedRotationPitch
The encoded entity pitch rotation.
|
int |
encodedRotationYaw
The encoded entity yaw rotation.
|
private Entity |
field_85178_v |
private boolean |
firstUpdateDone |
int |
lastHeadMotion |
double |
lastTrackedEntityMotionX |
double |
lastTrackedEntityMotionY |
private double |
lastTrackedEntityPosX |
private double |
lastTrackedEntityPosY |
private double |
lastTrackedEntityPosZ |
private static org.apache.logging.log4j.Logger |
logger |
double |
motionZ |
private boolean |
onGround |
boolean |
playerEntitiesUpdated |
private boolean |
ridingEntity |
private boolean |
sendVelocityUpdates |
private int |
ticksSinceLastForcedTeleport
every 400 ticks a full teleport packet is sent, rather than just a "move me +x" command, so that position
remains fully synced.
|
Entity |
trackedEntity
The entity that this EntityTrackerEntry tracks.
|
int |
trackingDistanceThreshold |
java.util.Set<EntityPlayerMP> |
trackingPlayers |
int |
updateCounter |
int |
updateFrequency
check for sync when ticks % updateFrequency==0
|
Constructor and Description |
---|
EntityTrackerEntry(Entity trackedEntityIn,
int trackingDistanceThresholdIn,
int updateFrequencyIn,
boolean sendVelocityUpdatesIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object p_equals_1_) |
private Packet |
func_151260_c() |
void |
func_151261_b(Packet packetIn) |
boolean |
func_180233_c(EntityPlayerMP playerMP) |
int |
hashCode() |
private boolean |
isPlayerWatchingThisChunk(EntityPlayerMP playerMP) |
void |
removeFromTrackedPlayers(EntityPlayerMP playerMP) |
void |
removeTrackedPlayerSymmetric(EntityPlayerMP playerMP)
Remove a tracked player from our list and tell the tracked player to destroy us from their world.
|
void |
sendDestroyEntityPacketToTrackedPlayers() |
private void |
sendMetadataToAllAssociatedPlayers()
Sends the entity metadata (DataWatcher) and attributes to all players tracking this entity, including the entity
itself if a player.
|
void |
sendPacketToTrackedPlayers(Packet packetIn)
Send the given packet to all players tracking this entity.
|
void |
updatePlayerEntities(java.util.List<EntityPlayer> p_73125_1_) |
void |
updatePlayerEntity(EntityPlayerMP playerMP) |
void |
updatePlayerList(java.util.List<EntityPlayer> p_73122_1_) |
private static final org.apache.logging.log4j.Logger logger
public Entity trackedEntity
public int trackingDistanceThreshold
public int updateFrequency
public int encodedPosX
public int encodedPosY
public int encodedPosZ
public int encodedRotationYaw
public int encodedRotationPitch
public int lastHeadMotion
public double lastTrackedEntityMotionX
public double lastTrackedEntityMotionY
public double motionZ
public int updateCounter
private double lastTrackedEntityPosX
private double lastTrackedEntityPosY
private double lastTrackedEntityPosZ
private boolean firstUpdateDone
private boolean sendVelocityUpdates
private int ticksSinceLastForcedTeleport
private Entity field_85178_v
private boolean ridingEntity
private boolean onGround
public boolean playerEntitiesUpdated
public java.util.Set<EntityPlayerMP> trackingPlayers
public EntityTrackerEntry(Entity trackedEntityIn, int trackingDistanceThresholdIn, int updateFrequencyIn, boolean sendVelocityUpdatesIn)
public boolean equals(java.lang.Object p_equals_1_)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void updatePlayerList(java.util.List<EntityPlayer> p_73122_1_)
private void sendMetadataToAllAssociatedPlayers()
public void sendPacketToTrackedPlayers(Packet packetIn)
public void func_151261_b(Packet packetIn)
public void sendDestroyEntityPacketToTrackedPlayers()
public void removeFromTrackedPlayers(EntityPlayerMP playerMP)
public void updatePlayerEntity(EntityPlayerMP playerMP)
public boolean func_180233_c(EntityPlayerMP playerMP)
private boolean isPlayerWatchingThisChunk(EntityPlayerMP playerMP)
public void updatePlayerEntities(java.util.List<EntityPlayer> p_73125_1_)
private Packet func_151260_c()
public void removeTrackedPlayerSymmetric(EntityPlayerMP playerMP)