From 2ff4367ee77941f3b8991e9e1bb950e225b7f101 Mon Sep 17 00:00:00 2001 From: kappa_maintainer Date: Thu, 23 Nov 2023 09:00:10 +0800 Subject: [PATCH] Should be the last fix for this --- .../minecraftforge/fml/common/registry/ItemStackHolderRef.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minecraftforge/fml/common/registry/ItemStackHolderRef.java b/src/main/java/net/minecraftforge/fml/common/registry/ItemStackHolderRef.java index 456d1ab63..de36212b3 100644 --- a/src/main/java/net/minecraftforge/fml/common/registry/ItemStackHolderRef.java +++ b/src/main/java/net/minecraftforge/fml/common/registry/ItemStackHolderRef.java @@ -76,7 +76,7 @@ public void apply() } try { - field.get(is); + ReflectionHackery.unsafe.ensureClassInitialized(field.getDeclaringClass()); ReflectionHackery.unsafe.putObject(ReflectionHackery.unsafe.staticFieldBase(field), ReflectionHackery.unsafe.staticFieldOffset(field), is); //field.set(null, is); }