Skip to content

Commit

Permalink
Fix 1.20.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
d0by1 committed Dec 28, 2023
1 parent d919a77 commit 83ff76a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 83ff76a

Please sign in to comment.