justinwon777 / HumanCompanions

Human Companions Mod
GNU General Public License v3.0
3 stars 15 forks source link

Modifying a companions NBT data causes duplication bug #37

Open marianyp opened 1 year ago

marianyp commented 1 year ago

Describe the bug Modifying a companion's NBT data causes their inventory to duplicate. This happens while using vanilla commands or programmatically with a mod or something like KubeJS.

To Reproduce

  1. Summon companion
  2. Notice what items it has in it's inventory and how many
  3. Run a command that modifies NBT data. e.g data merge entity @e[type=humancompanions:knight,limit=1,sort=nearest] {testing123: []}

Versions (Please fill this out) Minecraft version: 1.19.2 Forge version: 43.2.3 Human Companions version: 1.7.3

Additional info This bug duplicate the companion's armor, weapons, and any items you give it

justinwon777 commented 1 year ago

idk what the fix is