Skip to content

Commit

Permalink
Fixed chestplate armor getting removed instead of gave back to the pl…
Browse files Browse the repository at this point in the history
…ayer when using piggy backpack
  • Loading branch information
K0LALA committed Jul 23, 2024
1 parent 90b9990 commit 55c2a2b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ public InteractionResult interactLivingEntity(ItemStack stack, Player playerIn,
if (this.pickupEntity(playerIn, target)) {
// unequip old armor
if (chestArmor.getItem() != this) {
int piggyBackpackSlot = playerIn.getInventory().findSlotMatchingItem(stack);
playerIn.getInventory().add(piggyBackpackSlot, chestArmor);
playerIn.getInventory().add(chestArmor);
chestArmor = ItemStack.EMPTY;
}

Expand Down

0 comments on commit 55c2a2b

Please sign in to comment.