diff options
author | md_5 <git@md-5.net> | 2015-01-10 14:15:34 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2015-01-10 14:15:34 +1100 |
commit | 7658819130126f659c5543ae727c9919488bdb23 (patch) | |
tree | b770b6a7f5b37f7352aff2e0db8a375f30d51638 | |
parent | 4470462a54954109ebb39dcd0cc3bb4be983a050 (diff) | |
download | craftbukkit-7658819130126f659c5543ae727c9919488bdb23.tar craftbukkit-7658819130126f659c5543ae727c9919488bdb23.tar.gz craftbukkit-7658819130126f659c5543ae727c9919488bdb23.tar.lz craftbukkit-7658819130126f659c5543ae727c9919488bdb23.tar.xz craftbukkit-7658819130126f659c5543ae727c9919488bdb23.zip |
Fix off by one in CraftRabbit. Fixes SPIGOT-392
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java index f3a28ddd..0805dfe0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java @@ -31,7 +31,7 @@ public class CraftRabbit extends CraftAnimals implements Rabbit { @Override public Type getRabbitType() { - int type = getHandle().cl(); + int type = getHandle().cl(); // PAIL: Rename return CraftMagicMapping.fromMagic(type); } @@ -72,7 +72,7 @@ public class CraftRabbit extends CraftAnimals implements Rabbit { } public static Type fromMagic(int magic) { - if (magic > 0 && magic < reverse.length) { + if (magic >= 0 && magic < reverse.length) { return reverse[magic]; } else if (magic == 99) { return Type.THE_KILLER_BUNNY; |