Skip to content

Commit 85a7bcb

Browse files
authored
EntityTag.color: bugfix for cat types (#2818)
* cat color bug fix * version change
1 parent 2858f2f commit 85a7bcb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity

plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityColor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ public String getColor(boolean includeDeprecated) {
259259
case CAT -> {
260260
Cat cat = as(Cat.class);
261261
// TODO once 1.21 is the minimum supported version, replace with direct registry-based handling
262+
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_21)) {
263+
yield Utilities.namespacedKeyToString(cat.getCatType().getKey()) + "|" + cat.getCollarColor().name();
264+
}
262265
yield cat.getCatType() + "|" + cat.getCollarColor().name();
263266
}
264267
case PANDA -> {

0 commit comments

Comments
 (0)