Skip to content

Commit 9e48061

Browse files
committed
Fix slots voiding items because they are copies
1 parent a8f1183 commit 9e48061

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/main/java/slimeknights/mantle/inventory/BaseContainerMenu.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,13 @@ protected boolean mergeItemStackRefill(ItemStack stack, int startIndex, int endI
239239
if (l <= limit) {
240240
stack.setCount(0);
241241
itemstack1.setCount(l);
242+
slot.set(itemstack1); // Fabric: the item returned by getItem is a copy so we have to set it again
242243
slot.setChanged();
243244
flag1 = true;
244245
} else if (itemstack1.getCount() < limit) {
245246
stack.shrink(limit - itemstack1.getCount());
246247
itemstack1.setCount(limit);
248+
slot.set(itemstack1); // Fabric: the item returned by getItem is a copy so we have to set it again
247249
slot.setChanged();
248250
flag1 = true;
249251
}

0 commit comments

Comments
 (0)