mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2024-11-11 01:17:16 +00:00
Fix llama unable to remove carpet, not sure if null is a valid arg tho
This commit is contained in:
parent
1eb5225389
commit
98b6aa0185
1 changed files with 9 additions and 9 deletions
|
@ -21,8 +21,16 @@ public class LlamaWatcher extends ChestedHorseWatcher {
|
|||
return Llama.Color.values()[getData(MetaIndex.LLAMA_COLOR)];
|
||||
}
|
||||
|
||||
public DyeColor getCarpet() {
|
||||
if (!hasValue(MetaIndex.LLAMA_CARPET) || getData(MetaIndex.LLAMA_CARPET) == -1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return AnimalColor.getColorByWool(getData(MetaIndex.LLAMA_CARPET)).getDyeColor();
|
||||
}
|
||||
|
||||
public void setCarpet(DyeColor dyeColor) {
|
||||
setData(MetaIndex.LLAMA_CARPET, (int) dyeColor.getWoolData());
|
||||
setData(MetaIndex.LLAMA_CARPET, dyeColor == null ? -1 : (int) dyeColor.getWoolData());
|
||||
sendData(MetaIndex.LLAMA_CARPET);
|
||||
}
|
||||
|
||||
|
@ -31,14 +39,6 @@ public class LlamaWatcher extends ChestedHorseWatcher {
|
|||
setCarpet(color.getDyeColor());
|
||||
}
|
||||
|
||||
public DyeColor getCarpet() {
|
||||
if (!hasValue(MetaIndex.LLAMA_CARPET)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return AnimalColor.getColorByWool(getData(MetaIndex.LLAMA_CARPET)).getDyeColor();
|
||||
}
|
||||
|
||||
public void setStrength(int strength) {
|
||||
setData(MetaIndex.LLAMA_STRENGTH, strength);
|
||||
sendData(MetaIndex.LLAMA_STRENGTH);
|
||||
|
|
Loading…
Reference in a new issue