1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Add custom NBT to dropped item

Discussion in 'Skript' started by Tanner, Mar 31, 2020.

Thread Status:
Not open for further replies.
  1. Tanner

    Tanner New Member

    Joined:
    Mar 30, 2020
    Messages:
    5
    Likes Received:
    0
    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
     
Thread Status:
Not open for further replies.

Share This Page

Loading...