From 55d61653e90485f13edbfddde17bd2a3846e8b0a Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 23 Aug 2018 17:10:16 +1200 Subject: [PATCH] Fix Phantom disguise inverted pitch --- .../disguise/utilities/PacketsManager.java | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/me/libraryaddict/disguise/utilities/PacketsManager.java b/src/me/libraryaddict/disguise/utilities/PacketsManager.java index a0c8c893..bf355b13 100644 --- a/src/me/libraryaddict/disguise/utilities/PacketsManager.java +++ b/src/me/libraryaddict/disguise/utilities/PacketsManager.java @@ -515,33 +515,22 @@ public class PacketsManager { } public static byte getPitch(DisguiseType disguiseType, DisguiseType entityType, byte value) { + return getPitch(disguiseType, getPitch(entityType, value)); + } + + private static byte getPitch(DisguiseType disguiseType, byte value) { switch (disguiseType) { case MINECART: case MINECART_CHEST: - case MINECART_COMMAND: case MINECART_FURNACE: case MINECART_HOPPER: case MINECART_MOB_SPAWNER: case MINECART_TNT: - value = (byte) -value; - break; + case PHANTOM: + return (byte) -value; default: - break; + return value; } - switch (entityType) { - case MINECART: - case MINECART_CHEST: - case MINECART_FURNACE: - case MINECART_HOPPER: - case MINECART_MOB_SPAWNER: - case MINECART_TNT: - value = (byte) -value; - break; - default: - break; - } - - return value; } /**