Skip to content

Commit

Permalink
Use recipe getRemainingItems #1478
Browse files Browse the repository at this point in the history
  • Loading branch information
baileyholl committed Nov 3, 2024
1 parent 7dae701 commit f3b44d3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ public void craft(Player thePlayer, @Nullable String tab) {
return;
}
boolean playerInvUpdate = false;
List<ItemStack> remainingItems = currentRecipe.getRemainingItems(craftMatrix.asCraftInput());
for (int i = 0; i < 9; ++i) {
ItemStack currentStack = craftMatrix.getItem(i);
ItemStack oldItem = currentStack.copy();
ItemStack rem = currentStack.getCraftingRemainingItem();
ItemStack rem = remainingItems.size() > i ? remainingItems.get(i) : ItemStack.EMPTY;
if (!currentStack.isEmpty()) {
craftMatrix.removeItemNoUpdate(i, 1);
currentStack = craftMatrix.getItem(i);
Expand Down

0 comments on commit f3b44d3

Please sign in to comment.