#Help nbt block

27 messages · Page 1 of 1 (latest)

hexed matrix
#

Help with crafting botania for pure_daisy I can’t set the NBT parameter for the crafting result

    //Подозрительный песок 
    event.custom({
      "type": "botania:pure_daisy",
      "input": {
        "type": "block",
        "block": "minecraft:sand"
      },
      "output": Item.of('minecraft:suspicious_sand', '{BlockEntityTag:{LootTable:"minecraft:archaeology/trail_ruins_rare",id:"minecraft:brushable_block"}}')
    })
  })```
slow meadowBOT
#

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

smoky girder
#

try this

ServerEvents.recipes(event => {
    //Подозрительный песок 
    event.custom({
      "type": "botania:pure_daisy",
      "input": {
        "type": "block",
        "block": "minecraft:sand"
      },
      "output": Item.of('minecraft:suspicious_sand', '{BlockEntityTag:{LootTable:"minecraft:archaeology/trail_ruins_rare",id:"minecraft:brushable_block"}}').strongNBT()
    })
  })
smoky girder
#

hm

kindred tapirBOT
#

You can find your KubeJS server log in /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send it if asked, as it contains helpful information.

hexed matrix
#

he just doesn’t see craft, but he saw craft if you write it like this

    //Подозрительный песок 
    event.custom({
      "type": "botania:pure_daisy",
      "input": {
        "type": "block",
        "block": "minecraft:sand"
      },
      "output": {
        "type": "forge:nbt",
        "name": "minecraft:suspicious_sand",
        "nbt": "{BlockEntityTag:{LootTable:minecraft:archaeology/trail_ruins_rare,id:minecraft:brushable_block}}"
      }
    })
  })```
#

the block turned but did not have an NBT

smoky girder
#

is the json structure correct for the recipe tho?

hexed matrix
#

at what plan?

smoky girder
#

plan?

hexed matrix
#

it's just a flower that changes blocks around itself

smoky girder
#

what

#

im talking about the json recipe

#

is the structure correct?

#

or were you just guessing it

hexed matrix
#

so I threw off 2, that's right, I took it from the mod itself

hexed matrix
hexed matrix
#

this my craft

#

Item.of('minecraft:suspicious_sand', '{BlockEntityTag:{id:"minecraft:brushable_block",item:{Count:9b,id:"minecraft:air",tag:{data_model:{}}}},display:{Lore:[\'"(+NBT)"\']}}')

#

this is the result of the block after crafting

#

and I need this one

#

Item.of('minecraft:suspicious_sand', '{BlockEntityTag:{LootTable:"minecraft:archaeology/trail_ruins_rare",id:"minecraft:brushable_block"}}')

#

I can add that the block change occurs directly in the world

limpid olive
#

Isn't the output a blockstate? or is it a blockitem that the mod converts to block?
I'm going to check source code

#

yeah it is a blockstate