#help with code

6 messages · Page 1 of 1 (latest)

marsh linden
#

im trying to create a compacting recipe but it keeps giving me this error
server_scripts:script.js:75: Failed to create recipe for type 'create:compacting': dev.latvian.mods.rhino.NativeJavaObject@46bc4700 is not a valid result!
! [11:15:33] [ERR] Error occurred while handling event 'ServerEvents.recipes': java.lang.NullPointerException: Cannot invoke "dev.latvian.mods.kubejs.recipe.RecipeTypeJS.getId()" because "this.type" is null
[11:15:33] [ERR ] java.lang.NullPointerException: Cannot invoke "dev.latvian.mods.kubejs.recipe.RecipeTypeJS.getId()" because "this.type" is null

heres the portion of code its having trouble with i think
event.recipes.createCompacting(Fluid.of('createindustry:crude_oil_fluid', 100), ['minecraft:bone_block']).superheated()
event.recipes.createCompacting('minecraft:bedrock', [
'minecraft:stone', 'minecraft:stone', 'minecraft:stone', 'minecraft:stone', 'minecraft:nether_star']).superheated()
event.recipes.createFilling('createindustry:oil_deposit', [
'minecraft:bedrock',
Fluid.of('createindustry:crude_oil_fluid', 500)
])

plucky gullBOT
#

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

barren parcelBOT
#

You can write your code in a codeblock by typing it between the codeblock delimiters:

```js :arrow_left:

onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

As an example, :arrow_up: will look like this:

onEvent('recipes', e => {
  e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
gray sedge
#

also, it's not a rule, but it's a sort of common sense to use a title with more description of the problem, so that people (even people that could be related to it, if you were using someone's addon, for example) could find your post and help you faster

#

so instead of "help with code" or "please help me" try to use something like
"I need help with <this> and <that>" or something like that, sometimes just the context of the situation already help, like "Declaring <something> with <something> to do <something>"

dull carbon
#

put the output in [], that should fix it