#Struggling to make a createaddition:rolling recipe to work

90 messages · Page 1 of 1 (latest)

stone ice
#

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)

silver elmBOT
#

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

chrome tuskBOT
#

Paste version of rolling_recipe.json from @stone ice

proper epoch
#

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

chrome tuskBOT
#

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.

stone ice
#

All other recipes ive formulated this way worked and loaded just fine, thats why im confused

proper epoch
#

in json files?

#

thats not valid

#

you cant write code in json files

stone ice
#

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

proper epoch
#

well.... is it a json or a js file?

stone ice
#

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)

proper epoch
#

you sent a json file here

#

i just need you to tell me lol

stone ice
#

the main file is a javascript source file

proper epoch
#

okay

#

in that case

chrome tuskBOT
#

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.

stone ice
#

sorry, im a bit confused

chrome tuskBOT
stone ice
chrome tuskBOT
#

Paste version of server.log from @stone ice

stone ice
#

im sorry if im being confusing, like i said im still very novice

proper epoch
#
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

stone ice
#

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

stone ice
#

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

proper epoch
#

you dont need documentation, you can check the mod jar itself

chrome tuskBOT
#

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.

proper epoch
#

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

stone ice
#

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

proper epoch
#

ah look at the difference

#

you used item, they used id

stone ice
#

i tried both ways and it didnt work

#

i even just retried it to make sure i wasnt stupid about it

proper epoch
#

fix that bit and then send the log file again

stone ice
chrome tuskBOT
#

Paste version of server.log from @stone ice

proper epoch
#
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"}]
}
proper epoch
#

no thats the error

stone ice
#

oh alr

#

i thought you sent a remake of it or something mb

proper epoch
#

something doesnt make sense here

stone ice
#

this is one of the active working recipes added by the mod itself, copy and pasted straight from the source

chrome tuskBOT
#

Paste version of gold_ingot.json from @stone ice

stone ice
#

i dont know if this will help with anything but its worth a try to add it to the conversation

proper epoch
#

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

stone ice
#

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

proper epoch
#

whats your script for creating the plate

stone ice
#

i just accidentally shut down the script one sec sorry 💔

proper epoch
#

im in no rush :p

stone ice
chrome tuskBOT
#

Paste version of diamond_plate.json from @stone ice

stone ice
#

unless you meant you needed the startup scripts file that adds the item itself

#

i can get that too

proper epoch
#

ye the startup script

stone ice
#

alr mb

#

this is the whole file for it, but its at the top

chrome tuskBOT
#

Paste version of main.js from @stone ice

proper epoch
#

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' }]
})
stone ice
#

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

proper epoch
#

you have to restart for this

stone ice
#

alrighty

proper epoch
#

unless you want to use the tag event instead of the startup

stone ice
#

nah its fine idm restarting

#

i have a good pc so it takes less than a minute

#

it worked!

#

thank you lots for the help!

#

i guess the rolling mill only accepts tags for its input