#Im trying to add recipes for farmers delight on kubejs fabric 1.19.2, but it doesnt work

68 messages · Page 1 of 1 (latest)

lucid kernel
#

im removing recipes on the same file, but i just cant add recipes
i already used kubejs in 1.18, but im having problems in 1.19.2 fabric

rich meadowBOT
#

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

lucid kernel
#

i also tried the example script from the wiki, but it stils dont work

sage nacelle
#

??code

livid tinselBOT
# sage nacelle ??code

🗒️**Send the code!**🗒️
You may have an issue with a KubeJS script and you explain it to the best of your ability yet without the actual code in question we have very little to go off of in trying to assist you.

sage nacelle
#

??kjslogs

livid tinselBOT
# sage nacelle ??kjslogs

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.

lucid kernel
#
event.custom({
  "type": "farmersdelight:cooking",
  "cookingtime": 200,
  "experience": 1.0,
  "ingredients": [
    {
      "item": "farmersdelight:pumpkin_slice"
    },
    {
      "item": "farmersdelight:pumpkin_slice"
    },
    {
      "tag": "forge:milk"
    },
    {
      "tag": "forge:milk"
    },
    {
      "item": "minecraft:sugar"
    },
    {
      "item": "minecraft:sugar"
    }
  ],
  "recipe_book_tab": "meals",
  "result": {
    "item": "minecraft:pumpkin_pie"
  }
})
lucid kernel
lucid kernel
#
event.custom({
  type: 'farmersdelight:cutting',
  ingredients: [
    { item: 'minecraft:cake' }
  ],
  tool: { tag: 'forge:tools/knives' },
  result: [
    { item: 'farmersdelight:cake_slice', count: 7 }
  ]
})
#

I also tryed using this recipe, from the wiki, but it didn't work

split verge
#

Did you run /reload and/or restart the game?

lucid kernel
split verge
#

Post your entire script

lucid kernel
#
ServerEvents.recipes(event => {

///Removed Recipes
event.remove({ not: { type: 'farmersdelight:cooking' }, output: 'minecraft:pumpkin_pie'})
event.remove({ not: { type: 'farmersdelight:cooking' }, output: 'farmersdelight:chocolate_pie'})
event.remove({ not: { type: 'farmersdelight:cooking' }, output: 'farmersrespite:rose_hip_pie'})
event.remove({ not: { type: 'farmersdelight:cooking' }, output: 'farmersdelight:sweet_berry_cheesecake'})
event.remove({ not: { type: 'farmersdelight:cooking' }, output: 'farmersdelight:apple_pie'})
event.remove({ output: 'farmersdelight:apple_cider'})
    
////Custom Recipes
///Cooking Pot
//Pies
event.custom({
  "type": "farmersdelight:cooking",
  "cookingtime": 200,
  "experience": 1.0,
  "ingredients": [
    {
      "item": "farmersdelight:pumpkin_slice"
    },
    {
      "item": "farmersdelight:pumpkin_slice"
    },
    {
      "tag": "forge:milk"
    },
    {
      "tag": "forge:milk"
    },
    {
      "item": "minecraft:sugar"
    },
    {
      "item": "minecraft:sugar"
    }
  ],
  "recipe_book_tab": "meals",
  "result": {
    "item": "minecraft:pumpkin_pie"
  }
})




    
})
split verge
#

I don't see a problem with it, unless your json is invalid

#

Did you find how to make your code from Farmer's Delight code?

lucid kernel
#

yes

split verge
#

Where is your script located? Is it in server_scripts?

lucid kernel
#

yes

split verge
lucid kernel
#

i created a farmersdelight folder inside server_scripts

#

but the recipes removed are working

#

i just cant add anything

split verge
#

Hmm, are you sure it's "cookingtime" and not "cooking_time"? I ask because your "recipe_book_tab" has underscores

lucid kernel
#

ill try it

#

yep, still dont work

split verge
#

Yeah that looks right

lucid kernel
#

ill try to put the custom recipe in a different archive

split verge
#

That wont matter if your .removes are working

#

Try to put only the json code in the data folder in the proper directory and see if it works that way

lucid kernel
#

the etension of the archives should be .js or .json?

split verge
#

json

#

For example:

{
  "type": "farmersdelight:cooking",
  "cookingtime": 200,
  "experience": 1.0,
  "ingredients": [
    {
      "tag": "forge:raw_chicken"
    },
    {
      "item": "minecraft:carrot"
    },
    {
      "tag": "forge:salad_ingredients"
    },
    {
      "tag": "forge:vegetables"
    }
  ],
  "recipe_book_tab": "meals",
  "result": {
    "item": "farmersdelight:chicken_soup"
  }
}

smth.json

lucid kernel
#

even for the normal scripts folders?

split verge
#

Wdym?

lucid kernel
#

inside server_scripts, my archives should be .js or .json?

split verge
#

In server_scripts, you want .js. In data you want .json

lucid kernel
#

okay

#

i need to reboot the game or /reload should work?

split verge
#

/reload works

lucid kernel
#

oh, so the json file still dont work

split verge
#

Did you put it in the proper directory?

#

Where is it located in the data folder?

lucid kernel
#

data>farmersdelight>cooking

split verge
#

You skipped a recipes folder

#

Should be like data/farmersdelight/recipes/cooking/somename.json

lucid kernel
#

just did it

#

stills dont work

#

do i need some add on from kubejs?

#

because i tested witha vanilla recipe and worked

split verge
livid tinselBOT
#

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.

split verge
#

This time, drop the file into discord

#

No screenshot

lucid kernel
livid tinselBOT
#

Paste version of server.log from @lucid kernel

split verge
#

Send your latest.log

lucid kernel
livid tinselBOT
#

Paste version of latest.log from @lucid kernel

split verge
#

[19:14:30] [Worker-Main-21/WARN]: Invalid path in datapack: farmersdelight:recipes/cooking/CustomRecipes.json, ignoring

#

Try with your file name all lowercase

lucid kernel
#

tried it too, but still dont work

livid tinselBOT
#

Paste version of latest.log from @lucid kernel

lucid kernel
lucid kernel
#

even changing the tags, it doesnt work