diff --git a/patches/server/0021-Dont-send-useless-entity-packets.patch b/patches/server/0021-Dont-send-useless-entity-packets.patch index 76d6bd12..3c9ddfe2 100644 --- a/patches/server/0021-Dont-send-useless-entity-packets.patch +++ b/patches/server/0021-Dont-send-useless-entity-packets.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Dont send useless entity packets This patch is Powered by Purpur(https://github.com/PurpurMC/Purpur) diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 3b144c820531122eb37d41be06c182b5f5dc0724..a38114acf2d960e9dccf6a65ea8e39cfaef9f9ee 100644 +index 3b144c820531122eb37d41be06c182b5f5dc0724..8eb4a062489b42b26076d5f3bdfbff368c1a199b 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -165,20 +165,29 @@ public class ServerEntity { @@ -29,17 +29,14 @@ index 3b144c820531122eb37d41be06c182b5f5dc0724..a38114acf2d960e9dccf6a65ea8e39cf + } else { + packet1 = new ClientboundMoveEntityPacket.PosRot(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), (byte) i, (byte) j, this.entity.isOnGround()); } - } else { +- } else { - packet1 = new ClientboundMoveEntityPacket.PosRot(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), (byte) i, (byte) j, this.entity.isOnGround()); -+ this.wasOnGround = this.entity.isOnGround(); -+ this.teleportDelay = 0; -+ packet1 = new ClientboundTeleportEntityPacket(this.entity); } -- } else { -- this.wasOnGround = this.entity.isOnGround(); -- this.teleportDelay = 0; -- packet1 = new ClientboundTeleportEntityPacket(this.entity); + // Leaves end - Better checking + } else { + this.wasOnGround = this.entity.isOnGround(); + this.teleportDelay = 0; + packet1 = new ClientboundTeleportEntityPacket(this.entity); } + // Leaves start - dont send useless entity packets + if (top.leavesmc.leaves.LeavesConfig.dontSendUselessEntityPackets && isUselessPacket(packet1)) {