Solved Cant >Add< NBT to existing Item

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

L0v0lup

Member
Feb 19, 2017
26
2
3
27
Minecraft 1.12.2
Skript 2.2-dev36 |SkStuff T-Nuke Fork

Hello,
i am currently working on RPG Sets in Minecraft. For a set effekt i am trying to add HP attributes to an set part after all 4 armour parts have been equipped.

What would work:
code_language.skript:
give player diamond boots with custom nbt "{AttributeModifiers:[{AttributeName:""generic.maxHealth"",Name:""Health"",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1}]}"

What i wanna do but doesnt work:
code_language.skript:
add "{AttributeModifiers:[{AttributeName:""generic.maxHealth"",Name:""Health"",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1}]}" to nbt of player's tool

Does anybody have any workarounds for that?
 
Minecraft 1.12.2
Skript 2.2-dev36 |SkStuff T-Nuke Fork

Hello,
i am currently working on RPG Sets in Minecraft. For a set effekt i am trying to add HP attributes to an set part after all 4 armour parts have been equipped.

What would work:
code_language.skript:
give player diamond boots with custom nbt "{AttributeModifiers:[{AttributeName:""generic.maxHealth"",Name:""Health"",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1}]}"

What i wanna do but doesnt work:
code_language.skript:
add "{AttributeModifiers:[{AttributeName:""generic.maxHealth"",Name:""Health"",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1}]}" to nbt of player's tool

Does anybody have any workarounds for that?
1. Dont use skstuff its broken
2. Use jNBT
3. ???
4. Profit
 
  • Like
Reactions: L0v0lup
Thats works, thanks a lot! I was focused too much on finding a workaround, that i havent thoguht about looking out for another plugin :emoji_grinning:
 
  • Like
Reactions: Efnilite
SkStuff's NBT on 1.12 works for items and mobs, but not tile entities (because TukeNuke didnt bother to fix that in his fork). But any version below 1.12, SkStuff should be good for, as it was maintained until 1.11.

However, *adding* NBT to an existing item simply isn't an option with SkStuff, because it doesn't support that action - you can only create new items with NBT.
 
Status
Not open for further replies.