-
Bug
-
Resolution: Invalid
-
None
-
1.18.2
-
None
-
Edition Windows 11 Home
Version 21H2
Installed on 2021/10/07
OS build 22000.652
Experience Windows Feature Experience Pack 1000.22000.652.0
openjdk version "18" 2022-03-22
OpenJDK Runtime Environment (build 18+36-2087)
OpenJDK 64-Bit Server VM (build 18+36-2087, mixed mode, sharing)
Device name GingerNinja2962
Processor AMD Ryzen 9 5900X 12-Core Processor 3.70 GHz
Motherboard B550 AORUS ELITE AX V2
GPU GTX 570
Installed RAM 32,0 GB
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display
Edition Windows 11 Home Version 21H2 Installed on 2021/10/07 OS build 22000.652 Experience Windows Feature Experience Pack 1000.22000.652.0 openjdk version "18" 2022-03-22 OpenJDK Runtime Environment (build 18+36-2087) OpenJDK 64-Bit Server VM (build 18+36-2087, mixed mode, sharing) Device name GingerNinja2962 Processor AMD Ryzen 9 5900X 12-Core Processor 3.70 GHz Motherboard B550 AORUS ELITE AX V2 GPU GTX 570 Installed RAM 32,0 GB System type 64-bit operating system, x64-based processor Pen and touch No pen or touch input is available for this display
-
Unconfirmed
-
Creative
Data modify not working with Item.tag.Enchantments
What I expected to happen was...:
I wish to add enchantments from a book to a bow (multiple enchantments from multiple books)
By running the following:
- tag @e[nbt=\\{Item:{id:"minecraft:bow"}}, limit=1] add test
- data modify entity @e[tag=test, limit=1] Item.tag.Enchantments set from entity @e[nbt={Item:{tag: {StoredEnchantments: [
{lvl: 2s, id: "minecraft:punch"}
,{}]}}},limit=1] Item.tag.StoredEnchantments
- data modify entity @e[tag=test, limit=1] Item.tag.Enchantments merge from entity @e[nbt={Item:{tag: {StoredEnchantments: [
{lvl: 1s, id: "minecraft:infinity"}
,{}]}}},limit=1] Item.tag.StoredEnchantments
I EXPECT to get a bow with the enchantments from the first enchanted book AND the second, with all the enchantments. If the first book had and[Punch 2, Flame] the second book had [Power 5, Infinity] I EXPECT to get a bow with [Punch 2, Flame, Power 5, Infinity]
What actually happened was...:
By running the following:
- tag @e[nbt=\\{Item:{id:"minecraft:bow"}}, limit=1] add test
- data modify entity @e[tag=test, limit=1] Item.tag.Enchantments set from entity @e[nbt={Item:{tag: {StoredEnchantments: [
{lvl: 2s, id: "minecraft:punch"}
,{}]}}},limit=1] Item.tag.StoredEnchantments
At This point I get a bow with the first books Enchantments, After this point the next command DOES NOT work as EXPECTED.
- data modify entity @e[tag=test, limit=1] Item.tag.Enchantments merge from entity @e[nbt={Item:{tag: {StoredEnchantments: [
{lvl: 1s, id: "minecraft:infinity"}
,{}]}}},limit=1] Item.tag.StoredEnchantments
This command when run in a command block gives the output of:
- Expected list, got {id:"minecraaft:punch",lvl2s}
and the bow does not get any of the enchants from the 2nd book.
Inset, append, prepend and merge don't work, changing the Item.tag.Enchantments to Item.tag.Enchantments[] to specify the data type of list does not work either.
Steps to Reproduce:
1. Place down a Repeating Unconditional Always Active command block and past in the first command.
- tag @e[nbt=\\{Item:{id:"minecraft:bow"}}, limit=1] add test
2. Place down a Chain Conditional Always Active command block and past in the Second command, make sure the command blocks are linked into each other.
- data modify entity @e[tag=test, limit=1] Item.tag.Enchantments set from entity @e[nbt={Item:{tag: {StoredEnchantments: [
{lvl: 2s, id: "minecraft:punch"}
,{}]}}},limit=1] Item.tag.StoredEnchantments
3. Place down a Chain Conditional Always Active command block and past in the Third command, make sure the command blocks are linked into each other.
- data modify entity @e[tag=test, limit=1] Item.tag.Enchantments merge from entity @e[nbt={Item:{tag: {StoredEnchantments: [
{lvl: 1s, id: "minecraft:infinity"}
,{}]}}},limit=1] Item.tag.StoredEnchantments
4, Now give yourself a normal undamaged bow, a enchanted book with the following enchants (Power 5, Punch 2) and another enchanted book with the following enchants (Infinity, Flame)
5. Drop both enchanted books and the bow on the ground (preferably near each other)
6. upone picking up both the books and the bow inspect the bow to see the enchants and view the error in the 3rd command block