From 83ff76a39614d0f392d5cccafb1d986684fb4fe1 Mon Sep 17 00:00:00 2001 From: tplansky Date: Thu, 28 Dec 2023 02:32:39 +0100 Subject: [PATCH] Fix 1.20.4 support --- .../decentsoftware/holograms/api/nms/versions/NMS_1_17.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 1968c87d..52b120e6 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 @@ -97,7 +97,9 @@ public class NMS_1_17 extends NMS { // DATA WATCHER DATA_WATCHER_ITEM_CONSTRUCTOR = new ReflectConstructor(DWI_CLASS, DWO_CLASS, Object.class); if (Version.afterOrEqual(18)) { - if (Version.afterOrEqual(Version.v1_19_R2)) { + if (Version.afterOrEqual(Version.v1_20_R3)) { + ENTITY_TYPES_REGISTRY_FIELD = new ReflectField<>(ReflectionUtil.getNMClass("core.registries.BuiltInRegistries"), "g"); + } else if (Version.afterOrEqual(Version.v1_19_R2)) { ENTITY_TYPES_REGISTRY_FIELD = new ReflectField<>(ReflectionUtil.getNMClass("core.registries.BuiltInRegistries"), "h"); } else if (Version.afterOrEqual(19)) { ENTITY_TYPES_REGISTRY_FIELD = new ReflectField<>(ReflectionUtil.getNMClass("core.IRegistry"), "X");