mirror of
https://github.com/funkemunky/KauriV3.git
synced 2026-05-31 22:01:54 +00:00
Adding more velocity handling stuff
This commit is contained in:
@@ -158,6 +158,9 @@ public class PacketHandler {
|
||||
player.getInfo().setDoingVelocity(true);
|
||||
|
||||
player.runInstantAction(ka -> {
|
||||
if(!ka.isEnd()) {
|
||||
player.getVelocityHandler().onPre(packet);
|
||||
} else player.getVelocityHandler().onPost(packet);
|
||||
if(ka.isEnd() && player.getInfo().getVelocityHistory().contains(velocity)) {
|
||||
player.getOnVelocityTasks().forEach(task -> task.accept(velocity));
|
||||
player.getInfo().setDoingVelocity(false);
|
||||
@@ -305,6 +308,7 @@ public class PacketHandler {
|
||||
|
||||
// Post flying settings
|
||||
if(type.equals(PacketType.FLYING)) {
|
||||
player.getVelocityHandler().onFlyingPost((WPacketPlayInFlying)packetObject);
|
||||
player.getInfo().lsneaking = player.getInfo().sneaking;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user