From 7658819130126f659c5543ae727c9919488bdb23 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 10 Jan 2015 14:15:34 +1100 Subject: [PATCH] Fix off by one in CraftRabbit. Fixes SPIGOT-392 --- src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java | 4 ++-- 1 file 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 f3a28dddb7..0805dfe06c 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;