From 8d0aa545c14c2869bd92e131a5cb22e3f60b3c48 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 11 Jan 2018 01:36:22 +1300 Subject: [PATCH] Is issue #268 happy with this? Fixes falling blocks velocities. Maybe. --- .../libraryaddict/disguise/utilities/PacketsManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/me/libraryaddict/disguise/utilities/PacketsManager.java b/src/me/libraryaddict/disguise/utilities/PacketsManager.java index b527268d..12eba8e0 100644 --- a/src/me/libraryaddict/disguise/utilities/PacketsManager.java +++ b/src/me/libraryaddict/disguise/utilities/PacketsManager.java @@ -793,6 +793,7 @@ public class PacketsManager { packetsToListen.add(Server.ENTITY_HEAD_ROTATION); packetsToListen.add(Server.ENTITY_TELEPORT); packetsToListen.add(Server.REL_ENTITY_MOVE); + packetsToListen.add(Server.ENTITY_VELOCITY); } // Add equipment packet @@ -1113,6 +1114,13 @@ public class PacketsManager { } } + // If the entity is sending velocity and its a falling block + else if (sentPacket.getType() == Server.ENTITY_VELOCITY) { + if (disguise.getType() == DisguiseType.FALLING_BLOCK) { + packets.clear(); + } + } + // If the entity is rotating his head else if (sentPacket.getType() == Server.ENTITY_HEAD_ROTATION) { if (disguise.getType().isPlayer() && entity.getType() != EntityType.PLAYER) {