#Problem with testing in game.

49 messages · Page 1 of 1 (latest)

supple osprey
#

I created a recipe script to add a Farmers Delight cooking recipe for Rennet from Lets Do-Meadow.
I put the script in Kubejs server scripts folder and /reload the game however I got this error: Rennet.js#5: Error loading KubeJS script: server_scripts:Rennet.js': missing ] after element list. So how may I fix this error?

This is my script:

fleet runeBOT
#

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

crude sigil
#

this seems like it should be a datapack

grave wedge
#

you are using the datapack format in a kubejs script

#

take a look at the wiki, itll show you everything you need!

placid gullBOT
#

You can add, remove, and modify recipes with KubeJS. The wiki has a page on that!
If you want to learn how to add recipes to any mod, click the Custom button.

supple osprey
#

what is event.custom used for?

grave wedge
#

to add custom recipes that arent in kubejs or its addons

#

using datapack json format

supple osprey
#

such as farmer delight cooking?

grave wedge
#

yep, if you can find the json on thier github

supple osprey
#

but we have to use the js format not json format

#

so how do i do dat?

grave wedge
placid gullBOT
supple osprey
grave wedge
#

yes, you need to find the json for farmers delight recipes

supple osprey
grave wedge
#

put into an event.custom() like the wiki page says

#

did you read it?

supple osprey
#

wat bout dis?

grave wedge
#

yup! thats it

supple osprey
#

so i just missed serverevent.recipes

#

and commas

grave wedge
#

yes

supple osprey
#

wait ima test dis again and if it works fully ima close dis

#

bruh the recipe didn't register

#

not showing in jei

#

nor working in the pot

grave wedge
#

any kubejs errors?

placid gullBOT
#

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

placid gullBOT
#

You can modify various properties of existing blocks with KubeJS, and the wiki has a page on that!

supple osprey
#

actually wait

#

there is an error parsing the recipe

#

in logs

grave wedge
#

send the log file

supple osprey
#

Error parsing recipe farmersdelight:kjs_cboiqwsufpcxbtelp6svncfu7[farmersdelight:cooking]: {"type":"farmersdelight:cooking","ingredients":[{"item":"meadow:alpine_salt"},{"item":"minecraft:egg"},{"item":"minecraft:glass_bottle"}],"result":[{"item":"meadow:rennet","count":7}]}: com.google.gson.JsonSyntaxException: Expected result to be a JsonObject, was an array

#

dis is the error

grave wedge
#

oh in result

#
{
  "type": "farmersdelight:cooking",
  "cookingtime": 200,
  "experience": 1.0,
  "ingredients": [
    {
      "tag": "forge:raw_beef"
    },
    {
      "item": "minecraft:carrot"
    },
    {
      "item": "minecraft:potato"
    }
  ],
  "recipe_book_tab": "meals",
  "result": {
    "item": "farmersdelight:beef_stew"
  }
}```
#

this is what you need, your entire syntax is wrong i think, you are missing cookingtime, and experience

supple osprey
#

ok

#

wat bout dis?

crude sigil
supple osprey
#

i mean ok