#Complete Eidolon Recipe support

21 messages · Page 1 of 1 (latest)

bleak root
#

Using 1.20's new recipe schema registry event we can add proper addon-like support for any mod that uses json! This includes recipe creation, filtering by input/output and even replacing intputs and outputs!

This is a startup script

const $RecipeSchema = Java.loadClass('dev.latvian.mods.kubejs.recipe.schema.RecipeSchema')
const $ShapedRecipeSchema = Java.loadClass('dev.latvian.mods.kubejs.recipe.schema.minecraft.ShapedRecipeSchema')
const $RecipeComponentBuilder = Java.loadClass('dev.latvian.mods.kubejs.recipe.component.RecipeComponentBuilder')

StartupEvents.recipeSchemaRegistry(event => {
    const Components = event.components

    event.register('eidolon:worktable', new $RecipeSchema(
            $ShapedRecipeSchema.RESULT,
            $ShapedRecipeSchema.PATTERN,
            Components.get('filteredString')({ error: "reagents must have a length of four", filter: s => s.length == 4 })
                .key('reagents'),
            $ShapedRecipeSchema.KEY
        ));

    event.register('eidolon:crucible', new $RecipeSchema(
        Components.get('outputItem')().key('result'),
        new $RecipeComponentBuilder(2).add(
            Components.get('intNumber')().key('stirs').optional(0)
        ).add(
            Components.get('inputItemArray')().key('items').optional([])
        ).inputRole().asArray().key('steps')
    ))
})

Examples of using both of these are attached, or you can add the script, launch the game and get probe to dump to get full autocomplete for these types.

tough roverBOT
#

Paste version of example.js from @bleak root

bleak root
#

hey @dapper tiger ive add crucible support now

#

the two recipe examples in jei

dapper tiger
#

Ya thanks

plush monolith
#

you should know datapackable chant "recipes" are coming soon too

#

chant signs are a recipetype, soon

#

i.e

{
  "type": "eidolon:chant",
  "signs": [
    "eidolon:warding",
    "eidolon:soul",
    "eidolon:sacred",
    "eidolon:soul",
    "eidolon:warding"
  ]
}
#

now this doesnt mean you can datapack in chants

#

theyre still a java registry

#

datapack just lets you change them

bleak root
#

hrm

#

kjs needs a generic 'other registry' recipe component type

plush monolith
#

yeah

bleak root
#

turns out it has one

#

its just not registered so its harder to use

obtuse gust
#

name?

bleak root
#

RegistryComponent, see my recent #1056980648755208272

storm hare
#

hmmm i see this is for 1.20 sadly does this also work for eidolon in 1.19.2 or is there another way to do that?

bleak root
#

i think it might? i cant remember when this stuff was added