#KubeJS removed All recipes

93 messages · Page 1 of 1 (latest)

fading mango
#

KubeJS removed all recipes in my modpack except the ones that I changed/modified and the recipes work fine without KubeJS and everything was working just fine like yesterday and even using a previous version of the modpack it doesnt work

reef viperBOT
#

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

fading mango
#

I can send a link with the modpack with the most recent version and the older version but I know it is not safe to download a strangers file

#

I can also try to just send the folder

sturdy rune
#

you should probably conduct a binary search

#

i.e. remove half of the scripts, then test which one is causing all recipes to be removed

#

if it still occurs, remove half of that half

#

@fading mango

fading mango
#

okay thanks for the Idea

#

I will try and see if it works if it doesnt then I will let you know I guess

#

so I found the problem script

#

it has something to do with the Crafting Recipes script

#

is there a way to possible fix it?

sturdy rune
#

you'll have to post the exact script for us to know whether there are any issues with the code heh

fading mango
tardy plumeBOT
#

Paste version of CraftingRecipes.js from @fading mango

fading mango
#

right there

sturdy rune
#

a quick skim, I don't see anything particularly wrong with it

fading mango
#

it was working like yesterday

#

and then today me and my friend were trying to play the modpack and it kinda broke

sturdy rune
#

what I like to do when it comes to overwriting recipes is to overwrite the recipe's ID using .id('recipe_id_of_item')

fading mango
#

so I did start to do that

#

and then ended up stopping causes I dont know what that does exaclty

sturdy rune
#

basically, it makes your recipe have priority over another recipe with the same ID

fading mango
#

well not to seem like I know better

sturdy rune
#

very useful with mods that do weird stuff with their recipes like Apotheosis

fading mango
#

but why would me not doing that on all recipes suddenly make all recipes excpet the ones I changed just stop working

#

again I used ChatGPT to help with a lot of this

sturdy rune
#

I'm not sure what the issue could be

#

oh

#

??rule6

#

where da bot at

tardy plumeBOT
#

🤖 Rule 6: AI generated code (ChatGPT, etc.) is not allowed.

fading mango
#

okay

#

It was not all generated by AI

sturdy rune
#

AI doesn't know KubeJS 100%

fading mango
#

it was made by me

sturdy rune
#

just avoid using AI, it's not that great for kjs

fading mango
#

but it gave me an outline to go off of

sturdy rune
#

that's all!

fading mango
#

okay

#

so no fix then

sturdy rune
#

with that outta the way

#

I'm not sure what the issue in particular could be

#

did you test this in a new world?

fading mango
#

yes

sturdy rune
#

or minimal instance

fading mango
#

new and an older one

fading mango
sturdy rune
#

just KJS + any necessary mod

fading mango
#

almost all the mods are necessary

sturdy rune
#

necessary mod being any mod within the script

fading mango
#

okay

#

no

#

I can try that real quick

sturdy rune
#

also... when you created a new world

#

can you send the server log for that?

tardy plumeBOT
#

Please send your KubeJS server log. It can be found at /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send the file directly, without links or snippets.

fading mango
#

or just go into the one I just experienced this with?

sturdy rune
fading mango
tardy plumeBOT
#

Paste version of server.log from @fading mango

fading mango
#

so I think I found what is causing the problem

#

its specific lines of script I just copy and pasted

tardy plumeBOT
#

Paste version of Toms_Crafting.js from @fading mango

fading mango
#

I created a new profile with just KubeJS and Tom's simple storage

#

and added these recipe changes

#

and it broke the recipes

#

im gonna try removing each recipe on by one to se if that fixes it

#

okay I have narrowed it down to one thing

tardy plumeBOT
#

Paste version of Broken_one.txt from @fading mango

sturdy rune
#

in event.remove({ ouput: 'toms_storage:ts.crafting_terminal',}), can you remove the added comma at the end?

#

I was thinking that'd be a trail comma but maybe not

fading mango
#

yes I can but just to let you know I have one with that same thing and it works fine

#

nope didnt fix it

sturdy rune
#

hmm

#

try replacing the ID of the recipe using .id() and erase the event.remove() code

fading mango
#

okay

sturdy rune
#
        event.shaped('toms_storage:ts.crafting_terminal',
            [
                ' RT',
                'SCG',
                ' RT'
            ],
            {
                R: 'minecraft:redstone',
                T: 'minecraft:redstone_torch',
                S: 'toms_storage:ts.storage_terminal',
                C: 'minecraft:crafting_table',
                G: 'minecraft:glass_pane'
            }
        ).id('id_of_the_original_recipe')
fading mango
#

yeah that fixed it

sturdy rune
#

must've been something weird going on there

#

can't tell you what exactly tho

fading mango
#

okay

#

well I thank you so much

#

for helping me with my problem

#

have a good day

tardy plumeBOT
#

Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue!
This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.

Do you have any other questions regarding your issue? Feel free to ask!
Note: You should create a new post for unrelated issues.