Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Spectrall368 authored Jul 25, 2024
1 parent 18cdbc5 commit 7ee9d05
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions forge-1.14.4/templates/gui/gui_container.java.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ public class ${name}Menu extends Container implements Supplier<Map<Integer, Slot
if(j == ${component.id}) continue;
</#if>
</#list>
playerIn.dropItem(internal.getStackInSlot(j), false);
if (internal instanceof IItemHandlerModifiable)
((internal) IItemHandlerModifiable).setStackInSlot(j, ItemStack.EMPTY);
playerIn.dropItem(internal.extractItem(j, internal.getStackInSlot(j).getCount(), false), false);
}
} else {
for(int i = 0; i < internal.getSlots(); ++i) {
Expand All @@ -262,9 +260,7 @@ public class ${name}Menu extends Container implements Supplier<Map<Integer, Slot
if(i == ${component.id}) continue;
</#if>
</#list>
playerIn.inventory.placeItemBackInInventory(internal.getStackInSlot(i));
if (internal instanceof IItemHandlerModifiable)
((internal) IItemHandlerModifiable).setStackInSlot(i, ItemStack.EMPTY);
playerIn.inventory.placeItemBackInInventory(playerIn.world, internal.extractItem(i, internal.getStackInSlot(i).getCount(), false));
}
}
}
Expand Down

0 comments on commit 7ee9d05

Please sign in to comment.