1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-26 07:03:22 +00:00

Copy the item stack before merging

Otherwise we would mutate the stack, and so the current mount was
considered empty. Closes #240 (though would be nice to improve this).
This commit is contained in:
SquidDev 2019-06-21 22:00:21 +01:00
parent 13cb789c18
commit 772c54ec74

View File

@ -63,7 +63,7 @@ public ItemStack transferStackInSlot( PlayerEntity player, int slotIndex )
Slot slot = inventorySlots.get( slotIndex );
if( slot == null || !slot.getHasStack() ) return ItemStack.EMPTY;
ItemStack existing = slot.getStack();
ItemStack existing = slot.getStack().copy();
ItemStack result = existing.copy();
if( slotIndex == 0 )
{