Siphalor / nbt-crafting

A 1.15+ fabric Minecraft mod to enable nbt related recipe stuff
https://modrinth.com/mod/nbt-crafting
Apache License 2.0
49 stars 26 forks source link

Duplicate Enchantments using Nbt Merging #100

Open brotazoa opened 2 years ago

brotazoa commented 2 years ago

Using the anvil_add_enchantments recipe from the test mod with identical items causes duplicate enchantment keys.

base: minecraft bow with power 5 ingredient: minecraft bow with power 5

Output: minecraft bow with 2 occurrences of power 5, and one occurrence of multishot 2

Expected an output item with only one occurrence of power 5.

elhertz commented 2 years ago

I was just about to post a [Feature Request] but this issue is kinda similar. In my case I wanted to upgrade sharpness 5 to sharpness 6, but you have no way to remove the base's sharpness 5 when merging so you will end up with both sharpness 5 and sharpness 6 in the final result. Please add a way to edit the base's data when merging.

Edit: confused base with ingredient

Siphalor commented 2 years ago

This is possible in the latest alpha release (3.0.0-alpha.1).

Documentation and examples can be found around this page: https://mcwiki.siphalor.de/nbt-crafting/v3/#nbt-capabilities/dynamic-data/nbt-merging/

I'd love to hear to some feedback from you about these changes :)