#is this the right syntax to add NBT to an item ?

77 messages · Page 1 of 1 (latest)

stuck perch
#
event.create('thermal:upgrade_augment_signalum').displayName("Signalum Integral Components").subtypes(item => {AugmentData:{Type:'Upgrade',BaseMod:10.0f}})
sharp vergeBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

stuck perch
#

i dont think i understood

#

oh i have to put code inside

#
event.create('thermal:upgrade_augment_signalum').displayName("Signalum Integral Components").subtypes(item => {
        item.nbt = { "AugmentData": { "Type": "Upgrade", "BaseMod": "5.0f" } }
    })
```|
#

lets try this

#

NOEP

#

well idk how to give nbt to an item

#

@late chasm any clue ?

#

stop partying with people

cyan marten
#

@stuck perch

stuck perch
#

ty

#

uhm this looks complicateed

cyan marten
#

no, just take the subtype and the jei stuff

stuck perch
#

okay ty

stuck perch
#

is this correct for the SetNBT ?

cyan marten
#

not sure about 5.0F, can you use NBT.f(5) ?

stuck perch
#

i will

#

okay lemme test it

cyan marten
#

you need the jei stuff to show up there or you need to go to creative tab to grab it

stuck perch
#

okay

cyan marten
#

show your JEI code

stuck perch
#
JEIEvents.hideItems(event => {
    event.hide(Item.of("thermal:upgrade_augment_signalum").strongNBT())
})

JEIEvents.subtypes(event => {
    event.useNBT("thermal:upgrade_augment_signalum")
})```
#

well the item doesnt have NBT anyways

#
event.create('thermal:upgrade_augment_signalum').displayName("Signalum Integral Components").subtypes(originalStack => {
        let myItemList = Utils.newList()
        let myNewItem = originalStack.copy()
        myNewItem.setNbt({ AugmentData: { Type: 'Upgrade', BaseMod: NBT.f(5) } })
        myItemList.add(myNewItem)
        return myItemList
    })
#

5.0 maybe

#

hmm

#

basicaly

#
/give @p thermal:upgrade_augment_signalum{AugmentData:{Type:'Upgrade',BaseMod:5.0f}}
#

this is the command im trying to adapt into a real item

cyan marten
#

you can use setNbt('{AugmentData:{Type:'Upgrade',BaseMod:5.0f}')

stuck perch
#

lemme see

cyan marten
#

i guess

stuck perch
#

yeah

#

AAAAARGH

#

im gonna cry

#

im just not going to add nbt

#

imma do it at recipe creation

cyan marten
#

yes, you would still need that, but this is to fix JEI and creative tab

#

or item would be raw

#

it is bad for people who use JEI

#

to grab items

stuck perch
#

OOOH

#

¯_(ツ)_/¯

#

they better just not cheat

#

right ?

cyan marten
#

not cheat, most for testing stuff

stuck perch
#

well uhm

#

it's fiiiiiiineeeeeeeee

cyan marten
#

imagine if mojang didnt do that for potions hehe

#

you would have to type

#

all potions nbt

#

or craft it

stuck perch
#

lmao

cyan marten
#

so it generates with the nbt

stuck perch
#

true

#

its a tomorow me problem

#

im tired

cyan marten
#

didn't you already solve it?

#

tho?

stuck perch
#

i made a pickle that gives +100000% energy bonus

stuck perch
cyan marten
stuck perch
#

real

stuck perch
#

@cyan marten

#

🙂

#

i was using REI