#How do i set the NBT of an output

14 messages · Page 1 of 1 (latest)

ripe geyser
#
ServerEvents.recipes(event => {
    event.shapeless(
    Item.of("minecraft:dandelion", {"CustomModelData": 333333}),
    [ "2x minecraft:bone_meal" ]
  )
})

running on the latest release of kubejs, this code makes the set recipe return the output item, but without any NBT

granite phoenixBOT
#

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

deft kettle
#

try putting the nbt as a string

west spire
#

the nbt should be a string

#

oh

#

didn't see your message heh

deft kettle
ripe geyser
#
ServerEvents.recipes(event => {
    event.shapeless(
    Item.of("minecraft:dandelion", '{CustomModelData: 333333}'),
    [ "2x minecraft:bone_meal" ]
  )
})
deft kettle
#

oh wait

#

add .weakNBT() at the end

ripe geyser
#
ServerEvents.recipes(event => {
    event.shapeless(
    Item.of("minecraft:dandelion", '{CustomModelData: 333333}').weakNBT(),
    [ "2x minecraft:bone_meal" ]
  )
})
deft kettle
#

if that doesnt work, the only thing that can be wrong is the nbt itself

ripe geyser
#
ServerEvents.recipes(event => {
    event.shapeless(
    Item.of('minecraft:wooden_sword', '{Damage:2}').weakNBT(),
    [ "2x minecraft:bone_meal" ]
  )
})

copied using /kjs_hand

#

its displaying that it has NBT but the damage is still the same