From 95dd711ebc9d514e00c540393885a2279cb1e8d3 Mon Sep 17 00:00:00 2001 From: ewoudje <7384674+ewoudje@users.noreply.github.com> Date: Sat, 9 Nov 2024 16:32:33 +0100 Subject: [PATCH] Small fix --- .../neoforge/common/extensions/IItemStackExtension.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/neoforged/neoforge/common/extensions/IItemStackExtension.java b/src/main/java/net/neoforged/neoforge/common/extensions/IItemStackExtension.java index 4237f37617..4fa15f8d8b 100644 --- a/src/main/java/net/neoforged/neoforge/common/extensions/IItemStackExtension.java +++ b/src/main/java/net/neoforged/neoforge/common/extensions/IItemStackExtension.java @@ -63,7 +63,7 @@ private ItemStack self() { default ItemStack getCraftingRemainder() { ItemStack stack = self().getItem().getCraftingRemainder(self()); if (!stack.isEmpty() && stack.isDamageableItem() && stack.getDamageValue() > stack.getMaxDamage()) { - EventHooks.onPlayerDestroyItem(craftingPlayer.get(), stack, null); + EventHooks.onPlayerDestroyItem(CommonHooks.getCraftingPlayer(), stack, null); return ItemStack.EMPTY; } return stack;