NBT Tooltip

NBT Tooltip

72.4k Downloads

AttributeModifiers error

suzakuwcx opened this issue ยท 8 comments

commented

64MuNQ.png
this is a part of respond

  {
    "Amount": 8.0,
    "Slot": "chest",
    "AttributeName": "minecraft:generic.armor",
    "Operation": ,
    "UUID": [
      5648299,
      17825335,
      -15753219,
      4619561
    ],
    "Name": "generic.armor"
  },

but after checking in the '/give' command the correct is

  {
    "Amount": 8.0,
    "Slot": "chest",
    "AttributeName": "minecraft:generic.armor",
    "Operation": 1,
    "UUID": [I;
      5648299,
      17825335,
      -15753219,
      4619561
    ],
    "Name": "generic.armor"
  },
commented

Are you sure there is the I; part after UUID?
The missing 1 is effectively a bug

commented

yeah , without the "I;" ,the attribute will disapper in new item

commented

With that the output is no longer a valid json

commented

/give @s diamond_axe{AttributeModifiers:[{Slot:"mainhand",AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Amount:20,Operation:0,UUID:[I;1498693494,1027158888,1898994005,860320107]}]}
this is an example copy from wiki ,without I; the attribute will lost

commented

Well, yeah, because that functionality is not supposed to give you something valid for the /give command, it's supposed to be in JSON format

commented

understand, Thank you!

commented

I'll have a internal NBT format renderer next version for that

commented

version 1.1.2 should be soon available on curseforge and modrinth, fixes the missing this digit bug and adds a way to copy NBT to use on the /give command