Note for todo, adding flying tick to entitylocationhandler

This commit is contained in:
Dawson
2022-08-17 16:55:46 -04:00
parent d91a9c6133
commit 8fe45b623f
2 changed files with 7 additions and 10 deletions
@@ -51,6 +51,8 @@ public class EntityLocationHandler {
streak = 1;
}
entityLocationMap.values().forEach(EntityLocation::interpolateLocation);
lastFlying.reset();
}
@@ -73,12 +75,7 @@ public class EntityLocationHandler {
key -> new EntityLocation(entity));
runAction(entity, () -> {
//Ensuring fully interpolated before clearing old locations
while(eloc.increment > 0) {
eloc.interpolateLocation();
}
eloc.oldLocations.addAll(eloc.interpolatedLocations);
eloc.interpolateLocations();
//We don't need to do version checking here. Atlas handles this for us.
eloc.newX += packet.getX();
eloc.newY += packet.getY();
@@ -87,6 +84,7 @@ public class EntityLocationHandler {
eloc.newPitch += packet.getPitch();
eloc.increment = 3;
eloc.interpolateLocation();
});
}
@@ -109,12 +107,7 @@ public class EntityLocationHandler {
key -> new EntityLocation(entity));
runAction(entity, () -> {
//Ensuring fully interpolated before clearing old locations
while(eloc.increment > 0) {
eloc.interpolateLocation();
}
eloc.oldLocations.addAll(eloc.interpolatedLocations);
eloc.interpolateLocations();
if(data.getPlayerVersion().isOrAbove(ProtocolVersion.V1_9)) {
if (!(Math.abs(eloc.x - packet.getX()) >= 0.03125D)
&& !(Math.abs(eloc.y - packet.getY()) >= 0.015625D)
@@ -145,6 +138,7 @@ public class EntityLocationHandler {
eloc.increment = 3;
}
eloc.interpolateLocation();
});
}