Ive been working on my own modpack for cobblemon, and im working on some recipes to seem better/fit with similar already-implemented items. One of them is a diamond plate and thread (basically wire) and while i got the plate to work, i cant seem to get it to work. Ive done different set ups, different words, and even used one post on here as a reference and nothing worked. Im on Neoforge 1.21.1 (im sending a copy and paste chunk out of the server scripts file, so you wont see the ServerEvents stuff you need at the start)
#Struggling to make a createaddition:rolling recipe to work
90 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Paste version of rolling_recipe.json from @stone ice
theres a lot of things wrong here
first your file needs to be a javascript file, not a json file
secondly, youre missing the recipe event
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.
All other recipes ive formulated this way worked and loaded just fine, thats why im confused
i assume, i just used the 'main' file in the server_scripts folder
i didnt make any additional files until just now to copy and paste what i had written
bc i dont think sending my entire file wouldve been much help
well.... is it a json or a js file?
i mightve sent it wrong if thats not valid then, but everything ive written has worked and has all been in one file (im a very big novice to this all)
the main file is a javascript source file
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.
sorry, im a bit confused
alr one sec
is this the right file that was needed?
Paste version of server.log from @stone ice
im sorry if im being confusing, like i said im still very novice

Error parsing recipe createaddition:kjs/b24ta63aurg2egcurh3qdz0i: {"type":"createaddition:rolling","ingredients":[{"item":"kubejs:diamond_plate"}],"results":[{"count":2,"item":"kubejs:diamond_thread"}]}: com.google.gson.JsonParseException: Failed to parse either. First: No key amount in MapLike[{"count":2,"item":"kubejs:diamond_thread"}]; No key id in MapLike[{"count":2,"item":"kubejs:diamond_thread"}]; Second: Failed to parse either. First: No key id in MapLike[{"count":2,"item":"kubejs:diamond_thread"}]; Second: Failed to parse either. First: Not a JSON object: "kubejs:diamond_thread"; Second: Compat cannot be deserialized
this means the recipe structure you have is wrong
double check create addition to see how they structure the recipes
ive been trying a few different ones ive seen and i havent gotten any to work, theres not much documentation on this version i think
thats what i did originally, just copy and pasted the framing and replaced the ids
i know the rolling mill was broken recently and had just updated to start working again, so i dont know if its just broken with kubejs for now too or not
if it is, i can do a different way, just feels a lil out of place
you dont need documentation, you can check the mod jar itself
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.
check the custom page ^
if you copied it from the mod's github, maybe you were on the wrong branch and it was for a different mc version
i used the info from the mod file itself, i went into its recipes and grabbed a recipe using the rolling mill
thats how i had to form the other create ones as well
i tried both ways and it didnt work
i even just retried it to make sure i wasnt stupid about it
fix that bit and then send the log file again
Paste version of server.log from @stone ice
Error parsing recipe createaddition:kjs/eij263h6aeh5zna2asat25f5t: {"type":"createaddition:rolling","ingredients":[{"id":"kubejs:diamond_plate"}],"results":[{"count":2,"id":"kubejs:diamond_thread"}]}: com.google.gson.JsonParseException: Failed to parse either. First: Input does not contain a key [type]: MapLike[{"id":"kubejs:diamond_plate"}]; Second: Failed to parse either. First: Not a json array: {"id":"kubejs:diamond_plate"}; Second: No key tag in MapLike[{"id":"kubejs:diamond_plate"}]; No key item in MapLike[{"id":"kubejs:diamond_plate"}]
hm
{
"type":"createaddition:rolling",
"ingredients":[{"id":"kubejs:diamond_plate"}],
"results":[{"count":2,"id":"kubejs:diamond_thread"}]
}
should i try putting this in?
no thats the error
something doesnt make sense here
this is one of the active working recipes added by the mod itself, copy and pasted straight from the source
Paste version of gold_ingot.json from @stone ice
i dont know if this will help with anything but its worth a try to add it to the conversation
i have a feeling it can only take a tag as the input, or a list inside the list
its very weirdly made
all their examples use tags
maybe try putting the c:plates/diamond on your diamond plate and change the recipe to use a tag
this is probably gonna be a dumb question but how exactly do i do that? i havent really gotten that far into learning kubejs as of yet
whats your script for creating the plate
i just accidentally shut down the script one sec sorry 💔
im in no rush :p
i just sectioned it out again, it ended up as json again but its not the real file
Paste version of diamond_plate.json from @stone ice
unless you meant you needed the startup scripts file that adds the item itself
i can get that too
ye the startup script
Paste version of main.js from @stone ice
change the plate to be this
event.create('diamond_plate').tag('c:plates/diamond')
and then try changing the recipe to
event.custom({
type: 'createaddition:rolling',
ingredients: [{ tag: 'c:plates/diamond' }],
results: [{ count: 2, id: 'kubejs:diamond_thread' }]
})
alright just a sec
will i have to restart my client for it to update or just do a reload on startup scripts
not for the recipe, the tag
you have to restart for this
alrighty
unless you want to use the tag event instead of the startup
