Skip to content

Commit

Permalink
Destroys items if damaged enough in crafting neoforged#1585
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoudje committed Nov 8, 2024
1 parent 521fced commit 3b02552
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ public static Player getCraftingPlayer() {
}

public static ItemStack getCraftingRemainder(ItemStack stack) {
stack = stack.getCraftingRemainder();
stack = stack.getItem().getCraftingRemainder(stack);
if (!stack.isEmpty() && stack.isDamageableItem() && stack.getDamageValue() > stack.getMaxDamage()) {
EventHooks.onPlayerDestroyItem(craftingPlayer.get(), stack, null);
return ItemStack.EMPTY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private ItemStack self() {
* @return The resulting ItemStack
*/
default ItemStack getCraftingRemainder() {
return self().getItem().getCraftingRemainder(self());
return CommonHooks.getCraftingRemainder(self());
}

/**
Expand Down

0 comments on commit 3b02552

Please sign in to comment.