#Kubejs returning arbitrary error

8 messages · Page 1 of 1 (latest)

steep obsidian
#

I have a shaped recipe using a global. array from a startup script
const rocktypes = ["andesite", "basalt", "blackstone", "calcite", "deepslate", "diorite", "dripstone", "end_stone", "granite", "netherrack", "stone", "tuff"]js
it gets put into server scripts and does a shaped recipe

    e.shaped(rocktypes, [
        'RR ', 
        'RR ',
        '   '  
        ], { R: "kubejs:" + rocktypes + "_pebble" })
})```js
it keeps returning an error, saying the output itemstack "cant be empty" even though there is a variable
the code works completely fine, it creates the recipes, but it throws this useless error.
astral fractalBOT
#

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

halcyon cipher
#

itemstack cant be empty 99% of the time means the ID in the output doesnt exist

#

you are also committing a programming crime

#

rocktypes is a list, but then you redefine it to be an element of itself

#

so your recipe translates to:

e.shaped(["andesite", "basalt", "blackstone", "calcite", "deepslate", "diorite", "dripstone", "end_stone", "granite", "netherrack", "stone", "tuff"], [
        'RR ', 
        'RR ',
        '   '  
        ], { R: "kubejs:" + rocktypes + "_pebble" })
steep obsidian
#

Ok, will try to fix

steep obsidian
#

found out that dripstone is actually the problem, as its listed as "dripstone" in the list, but "dripstone block" in game.