diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java b/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java index 5fbe53ff..7b7b91b5 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseSound.java @@ -110,17 +110,6 @@ public enum DisguiseSound { return cancelSounds; } - public boolean isCancelled(String soundName) { - return cancelSounds.contains(soundName); - } - - public boolean isCancelSound(String sound) { - for (Sound s : cancelSounds) - if (getSoundName(s).equals(sound)) - return true; - return false; - } - /** * Used to check if this sound name is owned by this disguise sound. */ @@ -143,4 +132,15 @@ public enum DisguiseSound { } return null; } + + public boolean isCancelled(String soundName) { + return cancelSounds.contains(soundName); + } + + public boolean isCancelSound(String sound) { + for (Sound s : cancelSounds) + if (getSoundName(s).equals(sound)) + return true; + return false; + } } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseType.java b/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseType.java index 944f9b21..4a646eb4 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseType.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/DisguiseType.java @@ -2,18 +2,18 @@ package me.libraryaddict.disguise.DisguiseTypes; public enum DisguiseType { ARROW(EntityType.MISC, 60), BAT(EntityType.MOB), BLAZE(EntityType.MOB), BOAT(EntityType.MISC, 1), CAVE_SPIDER(EntityType.MOB), CHICKEN( - EntityType.MOB), COW(EntityType.MOB), CREEPER(EntityType.MOB), EGG(EntityType.MISC, 62), ENDER_CRYSTAL( + EntityType.MOB), COW(EntityType.MOB), CREEPER(EntityType.MOB), DROPPED_ITEM(EntityType.MISC, 2, 1), EGG(EntityType.MISC, 62), ENDER_CRYSTAL( EntityType.MISC, 51), ENDER_DRAGON(EntityType.MOB), ENDER_PEARL(EntityType.MISC, 65), ENDER_SIGNAL(EntityType.MISC, - 72), ENDERMAN(EntityType.MOB), EXPERIENCE_ORB(EntityType.MISC), FALLING_BLOCK(EntityType.MISC, 70, 1), FIREWORKS( + 72), ENDERMAN(EntityType.MOB), EXPERIENCE_ORB(EntityType.MISC), FALLING_BLOCK(EntityType.MISC, 70, 1), FIREBALL(EntityType.MISC, 63, + 0), FIREWORKS( EntityType.MISC, 76), FISHING_HOOK(EntityType.MISC, 90), GHAST(EntityType.MOB), GIANT(EntityType.MOB), IRON_GOLEM( - EntityType.MOB), DROPPED_ITEM(EntityType.MISC, 2, 1), ITEM_FRAME(EntityType.MISC, 71), FIREBALL(EntityType.MISC, 63, - 0), MAGMA_CUBE(EntityType.MOB), MINECART_CHEST(EntityType.MISC, 10, 1), MINECART_FURNACE(EntityType.MISC, 10, 2), MINECART_HOPPER( + EntityType.MOB), ITEM_FRAME(EntityType.MISC, 71), MAGMA_CUBE(EntityType.MOB), MINECART_CHEST(EntityType.MISC, 10, 1), MINECART_FURNACE(EntityType.MISC, 10, 2), MINECART_HOPPER( EntityType.MISC, 10), MINECART_MOB_SPAWNER(EntityType.MISC, 10, 4), MINECART_RIDEABLE(EntityType.MISC, 10, 0), MINECART_TNT( EntityType.MISC, 10, 3), MUSHROOM_COW(EntityType.MOB), OCELOT(EntityType.MOB), PAINTING(EntityType.MISC), PIG( - EntityType.MOB), PIG_ZOMBIE(EntityType.MOB), PLAYER(EntityType.PLAYER), SPLASH_POTION(EntityType.MISC, 73), PRIMED_TNT( + EntityType.MOB), PIG_ZOMBIE(EntityType.MOB), PLAYER(EntityType.PLAYER), PRIMED_TNT( EntityType.MISC, 50), SHEEP(EntityType.MOB), SILVERFISH(EntityType.MOB), SKELETON(EntityType.MOB), SLIME( EntityType.MOB), SMALL_FIREBALL(EntityType.MISC, 64, 0), SNOWBALL(EntityType.MISC, 61), SNOWMAN(EntityType.MOB), SPIDER( - EntityType.MOB), SQUID(EntityType.MOB), THROWN_EXP_BOTTLE(EntityType.MISC, 75), VILLAGER(EntityType.MOB), WITCH( + EntityType.MOB), SPLASH_POTION(EntityType.MISC, 73), SQUID(EntityType.MOB), THROWN_EXP_BOTTLE(EntityType.MISC, 75), VILLAGER(EntityType.MOB), WITCH( EntityType.MOB), WITHER(EntityType.MOB), WITHER_SKELETON(EntityType.MOB), WITHER_SKULL(EntityType.MISC, 66), WOLF( EntityType.MOB), ZOMBIE(EntityType.MOB); diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/WatcherValues.java b/src/me/libraryaddict/disguise/DisguiseTypes/WatcherValues.java index 0811a8ea..a2301ba4 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/WatcherValues.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/WatcherValues.java @@ -5,18 +5,18 @@ import java.util.Set; public enum WatcherValues { ARROW(16, (byte) 0), BAT(16, (byte) 0), BLAZE(16, (byte) 0), BOAT(19, 40, 17, 10, 18, 0), CAVE_SPIDER(), CHICKEN(12, 0), COW( - 12, 0), CREEPER(16, (byte) 0, 17, (byte) 0), EGG(), ENDER_CRYSTAL(), ENDER_DRAGON(16, 300), ENDER_PEARL(), ENDER_SIGNAL(), ENDERMAN( - 16, (byte) 0, 17, (byte) 1, 18, (byte) 0), EXPERIENCE_ORB(), FALLING_BLOCK(), FIREWORKS(), FISHING_HOOK(), GHAST(16, - (byte) 0), GIANT(), IRON_GOLEM(), DROPPED_ITEM(), ITEM_FRAME(2, 5, 3, (byte) 0), FIREBALL(), MAGMA_CUBE(16, (byte) 0, + 12, 0), CREEPER(16, (byte) 0, 17, (byte) 0), DROPPED_ITEM(), EGG(), ENDER_CRYSTAL(), ENDER_DRAGON(16, 300), ENDER_PEARL(), ENDER_SIGNAL(), ENDERMAN( + 16, (byte) 0, 17, (byte) 1, 18, (byte) 0), EXPERIENCE_ORB(), FALLING_BLOCK(), FIREBALL(), FIREWORKS(), FISHING_HOOK(), GHAST(16, + (byte) 0), GIANT(), IRON_GOLEM(), ITEM_FRAME(2, 5, 3, (byte) 0), MAGMA_CUBE(16, (byte) 0, 18, (byte) 0), MINECART_CHEST(16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0), MINECART_FURNACE(16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0), MINECART_HOPPER(16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0), MINECART_MOB_SPAWNER(16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0), MINECART_RIDEABLE( 16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0), MINECART_TNT(16, (byte) 0, 17, 0, 18, 1, 19, 0, 20, 0, 21, 6, 22, (byte) 0), MUSHROOM_COW(12, 0), OCELOT(12, 0, 16, (byte) 0, 17, "", 18, (byte) 0), PAINTING(), PIG(12, - 0, 16, (byte) 0), PIG_ZOMBIE(12, 0), PLAYER(8, 0, 9, (byte) 0, 10, (byte) 0, 13, 0), SPLASH_POTION(), PRIMED_TNT(), SHEEP( - 12, (byte) 0, 16, (byte) 0), SILVERFISH(), SKELETON(13, (byte) 0), SLIME(16, (byte) 0, 18, (byte) 0), SMALL_FIREBALL(), SNOWBALL(), SNOWMAN(), SPIDER(), SQUID(), THROWN_EXP_BOTTLE(), VILLAGER( + 0, 16, (byte) 0), PIG_ZOMBIE(12, 0), PLAYER(8, 0, 9, (byte) 0, 10, (byte) 0, 13, 0), PRIMED_TNT(), SHEEP( + 12, (byte) 0, 16, (byte) 0), SILVERFISH(), SKELETON(13, (byte) 0), SLIME(16, (byte) 0, 18, (byte) 0), SMALL_FIREBALL(), SNOWBALL(), SNOWMAN(), SPIDER(), SPLASH_POTION(), SQUID(), THROWN_EXP_BOTTLE(), VILLAGER( 16, 0), WITCH(), WITHER(16, 300), WITHER_SKELETON(13, (byte) 1), WITHER_SKULL(), WOLF(16, (byte) 0, 17, "", 18, 8, - 19, (byte) 0, 20, (byte) 14), ZOMBIE(13, (byte) 0); + 19, (byte) 0, 20, (byte) 14), ZOMBIE(12, (byte) 0, 13, (byte) 0); private HashMap values = new HashMap(); private WatcherValues(Object... obj) { @@ -32,12 +32,12 @@ public enum WatcherValues { } } - public Set getValues() { - return values.keySet(); - } - public Object getValue(int no) { return values.get(no); } + public Set getValues() { + return values.keySet(); + } + } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ArrowWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ArrowWatcher.java index 0c842abe..8ce311d3 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ArrowWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ArrowWatcher.java @@ -9,13 +9,13 @@ public class ArrowWatcher extends FlagWatcher { setValue(16, (byte) 0); } - public void setMoving(boolean moving) { - setValue(16, (byte) (moving ? 1 : 0)); - } - public boolean isMoving() { return (Byte) getValue(16) == 1; } + public void setMoving(boolean moving) { + setValue(16, (byte) (moving ? 1 : 0)); + } + } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ZombieWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ZombieWatcher.java index 1d6126d2..d6379e49 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ZombieWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ZombieWatcher.java @@ -1,16 +1,30 @@ package me.libraryaddict.disguise.DisguiseTypes.Watchers; -public class ZombieWatcher extends AgeableWatcher { +import me.libraryaddict.disguise.DisguiseTypes.FlagWatcher; + +public class ZombieWatcher extends FlagWatcher { public ZombieWatcher(int entityId) { super(entityId); + setValue(12, (byte) 0); setValue(13, (byte) 0); } + public boolean isBaby() { + return (Byte) getValue(12) == 1; + } + public boolean isVillager() { return (Byte) getValue(13) == 1; } + public void setBaby(boolean baby) { + if (isBaby() != baby) { + setValue(12, (byte) (baby ? 1 : 0)); + sendData(12); + } + } + public void setVillager(boolean villager) { if (isVillager() != villager) { setValue(13, (byte) (villager ? 1 : 0));