diff --git a/build.gradle b/build.gradle index 4678fdf..2ef6340 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ dependencies { compileOnly "com.arcaniax:HeadDatabase-API:1.3.2" implementation "org.bstats:bstats-bukkit:3.0.2" - implementation "de.tr7zw:item-nbt-api:2.14.0" + implementation "de.tr7zw:item-nbt-api:2.14.1" implementation "com.github.cryptomorin:XSeries:10.0.0" compileOnly "org.projectlombok:lombok:1.18.34" diff --git a/src/main/java/eu/decentsoftware/holograms/api/nms/versions/NMS_1_17.java b/src/main/java/eu/decentsoftware/holograms/api/nms/versions/NMS_1_17.java index 3514dc3..850bd5a 100644 --- a/src/main/java/eu/decentsoftware/holograms/api/nms/versions/NMS_1_17.java +++ b/src/main/java/eu/decentsoftware/holograms/api/nms/versions/NMS_1_17.java @@ -181,12 +181,17 @@ public class NMS_1_17 extends NMS { } // DATA WATCHER OBJECT if (Version.afterOrEqual(18)) { - if (Version.afterOrEqual(Version.v1_21_R2)) { - DWO_ENTITY_DATA = new ReflectField<>(ENTITY_CLASS, "am").getValue(null); - DWO_CUSTOM_NAME = new ReflectField<>(ENTITY_CLASS, "aO").getValue(null); - DWO_CUSTOM_NAME_VISIBLE = new ReflectField<>(ENTITY_CLASS, "aP").getValue(null); + if (Version.afterOrEqual(Version.v1_21_R3)) { + DWO_ENTITY_DATA = new ReflectField<>(ENTITY_CLASS, "am").getValue(null); + DWO_CUSTOM_NAME = new ReflectField<>(ENTITY_CLASS, "aO").getValue(null); + DWO_CUSTOM_NAME_VISIBLE = new ReflectField<>(ENTITY_CLASS, "aP").getValue(null); + DWO_ARMOR_STAND_DATA = new ReflectField<>(ENTITY_ARMOR_STAND_CLASS, "bI").getValue(null); + } else if (Version.afterOrEqual(Version.v1_21_R2)) { + DWO_ENTITY_DATA = new ReflectField<>(ENTITY_CLASS, "am").getValue(null); + DWO_CUSTOM_NAME = new ReflectField<>(ENTITY_CLASS, "aO").getValue(null); + DWO_CUSTOM_NAME_VISIBLE = new ReflectField<>(ENTITY_CLASS, "aP").getValue(null); DWO_ARMOR_STAND_DATA = new ReflectField<>(ENTITY_ARMOR_STAND_CLASS, "bJ").getValue(null); - } else if (Version.afterOrEqual(Version.v1_21_R1)) { + } else if (Version.afterOrEqual(Version.v1_21_R1)) { DWO_ENTITY_DATA = new ReflectField<>(ENTITY_CLASS, "ap").getValue(null); DWO_CUSTOM_NAME = new ReflectField<>(ENTITY_CLASS, "aQ").getValue(null); DWO_CUSTOM_NAME_VISIBLE = new ReflectField<>(ENTITY_CLASS, "aR").getValue(null); diff --git a/src/main/java/eu/decentsoftware/holograms/api/utils/reflect/Version.java b/src/main/java/eu/decentsoftware/holograms/api/utils/reflect/Version.java index 6e80bcf..5f48307 100644 --- a/src/main/java/eu/decentsoftware/holograms/api/utils/reflect/Version.java +++ b/src/main/java/eu/decentsoftware/holograms/api/utils/reflect/Version.java @@ -37,6 +37,7 @@ public enum Version { v1_20_R4(20, "1.20.5", "1.20.6"), v1_21_R1(21, "1.21", "1.21.1"), v1_21_R2(21, "1.21.2", "1.21.3"), + v1_21_R3(21, "1.21.4"), ; /*