Skip to content

Commit

Permalink
NPC inventory hackaround for give
Browse files Browse the repository at this point in the history
copy/pasted from inventory set
  • Loading branch information
mcmonkey4eva committed Sep 15, 2021
1 parent c3a2f99 commit 5d7c49e
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -974,6 +974,9 @@ public List<ItemStack> addWithLeftovers(int slot, boolean keepMaxStackSize, Item
}
}
}
if (Depends.citizens != null && idHolder instanceof NPCTag) {
((NPCTag) idHolder).getInventoryTrait().setContents(inventory.getContents());
}
return leftovers;
}

Expand Down

1 comment on commit 5d7c49e

@Akjosch
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified and it works in 1.2.1 Build #5763 (15-Sep-2021 18:12:12) on my server. Shouldn't a similar hackaround be required for take?

Please sign in to comment.