Fixed Ocelot.Type lookup - this fixes BUKKIT-952
This commit is contained in:
parent
f98afa6a74
commit
0a9cf32d3a
@ -31,6 +31,12 @@ public interface Ocelot extends Animals, Tameable {
|
|||||||
private static final Type[] types = new Type[Type.values().length];
|
private static final Type[] types = new Type[Type.values().length];
|
||||||
private final int id;
|
private final int id;
|
||||||
|
|
||||||
|
static {
|
||||||
|
for (Type type : values()) {
|
||||||
|
types[type.getId()] = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Type(int id) {
|
private Type(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user