This commit is contained in:
Dawson
2022-08-22 12:00:24 -04:00
3 changed files with 5 additions and 1 deletions
@@ -34,4 +34,5 @@ public class GeneralInformation {
public KLocation lastKnownGoodPosition;
public List<Vector> velocityHistory = Collections.synchronizedList(new EvictingList<>(5));
public List<PlayerCapabilities> possibleCapabilities = new ArrayList<>();
private int clientGroundTicks, clientAirTicks;
}
@@ -534,5 +534,8 @@ it
deltaXZ = Math.hypot(deltaX, deltaZ); // Calculating here to cache since hypot() can be heavy.
deltaYaw = to.getLoc().yaw - from.getLoc().yaw;
deltaPitch = to.getLoc().pitch - from.getLoc().pitch;
player.getInfo().setClientGroundTicks(packet.isOnGround() ? player.getInfo().getClientGroundTicks() + 1 : 0);
player.getInfo().setClientAirTicks(!packet.isOnGround() ? player.getInfo().getClientAirTicks() + 1 : 0);
}
}
@@ -17,7 +17,7 @@ public class MovementUtils {
private static Enchantment DEPTH;
public static float getJumpHeight(APlayer data) {
public static double getJumpHeight(APlayer data) {
float baseHeight = 0.42f;
baseHeight+= data.getPotionHandler().getEffectByType(PotionEffectType.JUMP).map(ef -> ef.getAmplifier() + 1)