From c4ab62c85739102514d04fd570afc824bb5a24a7 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Thu, 5 Jan 2023 00:21:04 +0100 Subject: [PATCH] Fix NMS ItemStack reflection issue --- .../lib/paper/reflect/wrapper/minecraft/world/ItemStack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ItemStack.java b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ItemStack.java index a682c56..8354f01 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ItemStack.java +++ b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ItemStack.java @@ -11,7 +11,7 @@ import static fr.pandacube.lib.util.ThrowableUtil.wrapReflectEx; public class ItemStack extends ReflectWrapper { public static final NMSReflect.ClassMapping MAPPING = wrapEx(() -> NMSReflect.mojClass("net.minecraft.world.item.ItemStack")); - private static final ReflectMethod of = wrapEx(() -> MAPPING.mojMethod("of", CompoundTag.class)); + private static final ReflectMethod of = wrapEx(() -> MAPPING.mojMethod("of", CompoundTag.MAPPING)); public static ItemStack of(CompoundTag nbt) { return wrap(wrapReflectEx(() -> of.invokeStatic(unwrap(nbt))), ItemStack.class);