From 577152ebd1a30cdbc833b473cf5a792c581741d4 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 3 Mar 2012 00:46:27 +0000 Subject: [PATCH] Fixed Ocelot.Type lookup - this fixes BUKKIT-952 By: Nathan Adams --- paper-api/src/main/java/org/bukkit/entity/Ocelot.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Ocelot.java b/paper-api/src/main/java/org/bukkit/entity/Ocelot.java index 54bde9c8a..a4df056b0 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Ocelot.java +++ b/paper-api/src/main/java/org/bukkit/entity/Ocelot.java @@ -31,6 +31,12 @@ public interface Ocelot extends Animals, Tameable { private static final Type[] types = new Type[Type.values().length]; private final int id; + static { + for (Type type : values()) { + types[type.getId()] = type; + } + } + private Type(int id) { this.id = id; }