Fix Phantom disguise inverted pitch

This commit is contained in:
libraryaddict 2018-08-23 17:10:16 +12:00
parent ca8c5aeb86
commit 55d61653e9

View File

@ -515,33 +515,22 @@ public class PacketsManager {
} }
public static byte getPitch(DisguiseType disguiseType, DisguiseType entityType, byte value) { 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) { switch (disguiseType) {
case MINECART: case MINECART:
case MINECART_CHEST: case MINECART_CHEST:
case MINECART_COMMAND:
case MINECART_FURNACE: case MINECART_FURNACE:
case MINECART_HOPPER: case MINECART_HOPPER:
case MINECART_MOB_SPAWNER: case MINECART_MOB_SPAWNER:
case MINECART_TNT: case MINECART_TNT:
value = (byte) -value; case PHANTOM:
break; return (byte) -value;
default: 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;
} }
/** /**