-
Bug
-
Resolution: Invalid
-
None
-
24w09a, 24w10a
-
Community Consensus
-
Data Packs
When using the item_modifiers in a datapack, you can't copy nbt from storage to other components than custom_data.
Before nbt was copied to the tag of the item. Now it is only copied to custom_data because copy_nbt does not exist anymore
storage "test": {CMD: 2}
item_modifiers/set_cmd.json :
| Before | Now |
|---|---|
| Item: /data get @s SelectedItem =
{... tag: {CustomModelData: 1}}
|
Item: /data get @s SelectedItem.components =
{... "minecraft:custom_model_data": 1}
|
[
{
"function": "minecraft:copy_nbt",
"source":{
"type": "minecraft:storage",
"source": "minecraft:test"
},
"ops": [
{
"source": "CMD",
"target": "CustomModelData",
"op": "replace"
}
]
}
]
Result:
{... tag: {CustomModelData: 2}}
|
[
{
"function": "minecraft:copy_custom_data",
"source":{
"type": "minecraft:storage",
"source": "minecraft:test"
},
"ops": [
{
"source": "CMD",
"target": "custom_model_data",
"op": "replace"
}
]
}
]
Result:
{... "minecraft:custom_model_data": 1, "minecraft:custom_data": {custom_model_data: 2}}
|
Linked below are the 2 datapacks each corresponding with their mc version.
I created some click events with tellraw to easily see the process (also attached the images with the code & results)
In the datapack I set the target to "components.custom_model_data" but its still the same result.