Fixing stuff not working

This commit is contained in:
Dawson
2022-08-16 11:46:39 -04:00
parent 20978a30e1
commit bf0fb79547
42 changed files with 667 additions and 224 deletions
@@ -82,23 +82,22 @@ public class PacketHandler {
}
});
player.getLagInfo().getLastClientTransaction().reset();
} else {
Optional.ofNullable(player.instantTransaction.remove(packet.b()))
.ifPresent(t -> t.two.accept(t.one));
}
Optional.ofNullable(player.instantTransaction.remove(packet.b()))
.ifPresent(t -> t.two.accept(t.one));
}
break;
}
case FLYING: {
WPacketPlayInFlying packet = (WPacketPlayInFlying) packetObject;
player.getEntityLocationHandler().onFlying();
if(player.getMovement().isExcuseNextFlying()) {
player.getMovement().setExcuseNextFlying(false);
return;
}
player.getEntityLocationHandler().onFlying();
if(player.getPlayerVersion().isOrAbove(ProtocolVersion.V1_17)
&& packet.isMoved() && packet.isLooked()
&& MovementUtils.isSameLocation(new KLocation(packet.getX(), packet.getY(), packet.getZ()),
@@ -148,6 +147,12 @@ public class PacketHandler {
}
break;
}
case RESPAWN: {
if(player.getPlayerVersion().isBelow(ProtocolVersion.V1_14)) {
player.runKeepaliveAction(k -> player.getBukkitPlayer().setSprinting(false), 1);
}
break;
}
case SERVER_POSITION: {
player.getMovement().addPosition((WPacketPlayOutPosition) packetObject);
break;