#item nbt data

1 messages · Page 1 of 1 (latest)

tacit oriole
#

i have made a skript that changes the drop of an item, and i want it so the item has nbt data, how could i do that?

    cancel event
    set block to air
    drop obsidian```

and the nbt/item attributes are {display:{Name:'{"extra":[{"bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"dark_green","text":"MEGA OBSIDIAN"}],"text":""}'},Enchantments:[{id:"minecraft:unbreaking",lvl:1s}]}
#

(im fairly new to skript)

fathom marsh
#

why dont u just renname it

#

and apply enchant

tacit oriole
#

idk how...

fathom marsh
#

drop obsidian named "the name you want"

tacit oriole
#

ok done

#

now how do i add the unbreaking 1?

next sable
#

you can set a variable to the item, enchant the variable with unbreaking 1, then drop 1 of the variable at the location

tacit oriole
#

hmm okay i understand what ur saying

#

im gonna try that

fathom marsh
#

what did u try

tacit oriole
#

nothing.. i cant seem to understand how to make a variable of an item

fathom marsh
#

ok

tacit oriole
#

wait

#

hmm

#

i think i made it work but i havent tried but got no errors

#

nvm

fathom marsh
#

show

#

code

tacit oriole
#

now looking at it i kinda see why its not working lol

#

1 sec

fathom marsh
#

you essentialy just wanna add glow to it

#

right

tacit oriole
#

no i specifically need unbreaking 1

#
    cancel event
    enchant {obsidian} with unbreaking 1
    set block to air
    drop 1 of {obsidian} named "&2&lMEGA OBSIDIAN"```
#

i mean

#

how can it enchant something before its there

#

so

#

hm

fathom marsh
#

...

#

what

#

the

#

fuck

tacit oriole
#

yeah dont ask

#

idk

#

oh wait

#

i just noticed

#

fr

#

wtf

#

is that

#

@fathom marsh

#

i made it work

fathom marsh
#

ok

tacit oriole
#
    cancel event
    set {obsidian} to obsidian
    enchant {obsidian} with unbreaking 1
    set block to air
    drop 1 of {obsidian} named "&2&lMEGA OBSIDIAN"```
#

😄

fathom marsh
#

gaming

next sable
#

it didn't work the first time because you never set the variable to an item, which is literally what I said to do

tacit oriole
#

but found out then