Add custom NBT to dropped 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.

Tanner

New Member
Mar 30, 2020
5
0
0
25
So the below code is working for everything except for the adding the custom attribute ala NBT to the leather cap. I have been at this for hour just going full blown shotgun strategy trying literally everything I research to get this to work :/ no luck. (also im brand new to skripting so be nice if my skript format is terrible or something lol. Thanks!

on death of pig:
chance of 40%:
drop 1 brown mushroom named "&6&lTruffle" at location of victim
stop
chance of 100%:
drop 1 leather cap at location of victim
add "AttributeModifiers: [{UUIDMost: -788667936513702820L, UUIDLeast: -5748163208680242150L, Amount: 20d, AttributeName: ""generic.maxHealth"", Operation: 0, Name: ""generic.maxHealth""}]}}" to last spawned entity's nbt
stop
else:
stop
 
Status
Not open for further replies.