Fixed animation on stands.

This commit is contained in:
Flanks255 2024-06-02 17:54:50 -05:00
parent fbdfc2e845
commit a841121dde

View file

@ -76,7 +76,7 @@ public class BlockDisplayStand extends BlockContainerBase {
heldItem.shrink(1); heldItem.shrink(1);
else else
player.swing(hand, true); player.swing(hand, true);
return InteractionResult.CONSUME; return InteractionResult.SUCCESS;
} else if (ItemUtil.canBeStacked(heldItem, stackThere)) { } else if (ItemUtil.canBeStacked(heldItem, stackThere)) {
int maxTransfer = Math.min(stackThere.getCount(), heldItem.getMaxStackSize() - heldItem.getCount()); int maxTransfer = Math.min(stackThere.getCount(), heldItem.getMaxStackSize() - heldItem.getCount());
if (maxTransfer > 0) { if (maxTransfer > 0) {
@ -87,7 +87,7 @@ public class BlockDisplayStand extends BlockContainerBase {
ItemStack newStackThere = stackThere.copy(); ItemStack newStackThere = stackThere.copy();
newStackThere.shrink(maxTransfer); newStackThere.shrink(maxTransfer);
stand.inv.setStackInSlot(0, newStackThere); stand.inv.setStackInSlot(0, newStackThere);
return InteractionResult.CONSUME; return InteractionResult.SUCCESS;
} }
} }
} else { } else {