mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-11-09 09:54:14 +01:00
Fix AnimalColor getting not working properly
This commit is contained in:
parent
d7010c6389
commit
4b55a24444
@ -4,6 +4,15 @@ public enum AnimalColor {
|
|||||||
BLACK(15), BLUE(11), BROWN(12), CYAN(9), GRAY(7), GREEN(13), LIGHT_BLUE(3), LIME(5), MAGENTA(2), ORANGE(1), PINK(6), PURPLE(
|
BLACK(15), BLUE(11), BROWN(12), CYAN(9), GRAY(7), GREEN(13), LIGHT_BLUE(3), LIME(5), MAGENTA(2), ORANGE(1), PINK(6), PURPLE(
|
||||||
10), RED(14), SILVER(8), WHITE(0), YELLOW(4);
|
10), RED(14), SILVER(8), WHITE(0), YELLOW(4);
|
||||||
|
|
||||||
|
public static AnimalColor getColor(int nmsId) {
|
||||||
|
for (AnimalColor color : values()) {
|
||||||
|
if (color.getId() == nmsId) {
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private int value;
|
private int value;
|
||||||
|
|
||||||
private AnimalColor(int newValue) {
|
private AnimalColor(int newValue) {
|
||||||
|
@ -11,7 +11,7 @@ public class SheepWatcher extends AgeableWatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public AnimalColor getColor() {
|
public AnimalColor getColor() {
|
||||||
return AnimalColor.values()[(Byte) getValue(16, (byte) 0) & 15];
|
return AnimalColor.getColor((Byte) getValue(16, (byte) 0) & 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSheared() {
|
public boolean isSheared() {
|
||||||
|
@ -10,7 +10,7 @@ public class WolfWatcher extends TameableWatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public AnimalColor getCollarColor() {
|
public AnimalColor getCollarColor() {
|
||||||
return AnimalColor.values()[(Byte) getValue(20, (byte) 14)];
|
return AnimalColor.getColor((Byte) getValue(20, (byte) 14));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAngry() {
|
public boolean isAngry() {
|
||||||
|
Loading…
Reference in New Issue
Block a user