mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-14 15:26:54 +01:00
Fix Phantom disguise inverted pitch
This commit is contained in:
parent
ca8c5aeb86
commit
55d61653e9
@ -515,34 +515,23 @@ 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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the yaw for the disguises
|
||||
|
Loading…
Reference in New Issue
Block a user