Fix fireball, giant, ghast and items

This commit is contained in:
Andrew
2013-05-30 08:46:51 +12:00
parent 1a3ab9379a
commit 3c51dae83b
4 changed files with 16 additions and 15 deletions

View File

@@ -89,12 +89,14 @@ public class LibsDisguises extends JavaPlugin {
if (disguise.getType() == DisguiseType.ENDER_DRAGON) {
byte value = (Byte) mods.read(4);
mods.write(4, (byte) (value - 128));
} else if (disguise.getType().isMisc()) {
} else if (disguise.getType().isMisc() || disguise.getType() == DisguiseType.GHAST) {
byte value = (Byte) mods.read(4);
if (disguise.getType() != DisguiseType.PAINTING)
mods.write(4, (byte) (value + 64));
mods.write(4, (byte) (value + 128));
else if (disguise.getType().isMisc())
mods.write(4, (byte) -(value + 128));
else
mods.write(4, (byte) -(value += 128));
mods.write(4, (byte) (value - 64));
}
}
}