#Adding existing recipe to recipe viewer for server

36 messages · Page 1 of 1 (latest)

clear elm
#

Hi, I would like to add recipes that aren't listed already in the recipe viewer EMI to a server, These recipes are In world interactions, with the same/similar mechanics to cobblestone generators.

These recipes already exist in the game, but are just not listed in EMI, and so I was thinking these would belong in the client_scripts/ directory due to JEI/REI events being listed on the page, however the wiki doesn't seem to have any further info on the client scripts page

Any help if figuring out what to use would be wonderful, thank you!

MC Version: 1.21.1
KubeJS Version: 2101.7.1-build.181
Modloader: NeoForge

vestal sundialBOT
#

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

clear elm
#

In the pack the server is running we have many of these cobble generator recipes, Ideally It would be best if the script could access the FluidInteractionRegistry and create recipes based on that however I'm entirely unsure if that's possible, nor do I have knowledge of Java, and so in the event that this isn't possible, I have prepared an array of valid recipes to use instead

peak stratus
clear elm
#

This being client side only is not necessary, I have access to both the server files and the files that the players download for the pack.

I'm not sure what you mean by plugin, a KubeJS plugin? support for EMI using KubeJS should be built in as per the wiki, if I'm not misunderstanding it that is

peak stratus
#

you need a plugin that creates the tab layout stuff, you can't magically put stuff to render on JEI

clear elm
#

even if I want to add the recipes to a tab that already exists? emi:world_interaction

peak stratus
#

that is why i'm asking if this world interaction stuff is already present on some JEI mod

clear elm
#

Oh yes, the tab already exists, sorry

peak stratus
#

that is the point, so it exists on EMI

#

now let me check if EMI have some documentation on it

#

@clear elm looks like you can do it via json

#

trying to figure out how

clear elm
#

That was one of the options we originally thought of, however with the amount of recipes we want to show, and that it requires a json file per recipe, we elected to find a programmatic route instead, and given we are already using KubeJS we figured it would be the best bet

peak stratus
#

i mean, not even generate it, just directly add

clear elm
#

Using KubeJS? I had no idea

peak stratus
#

FluidInteractionRegistry
is this from which mod?

clear elm
#

That is a vanilla java registry I believe, in the event that that wasn't an option I have a nested array already populated with the values in this format:

const Recipes = [
[FluidIngredient1a, FluidIngredientab, BlockResult1],
[FluidIngredient2a, FluidIngredient2b, BlockResult2],
]
peak stratus
#

ok

#
ClientEvents.generateAssets("last", event => {
    event.json("emi:recipe/additions/test", 
        {
            "type": "emi:world_interaction",
            "left": "item:minecraft:campfire",
            "right": "#item:c:raw_materials",
            "output": "item:minecraft:apple"
        }
    )
})

but your usage is fluid right?

#

might need to replace item for fluid like
fluid:minecraft:water

#

let me test

clear elm
#

it is fluid, the usage of tags is also perfect

peak stratus
#

so if fluid tag, #fluid:...

#

yep, fluid:minecraft:water example

#

let me try c:biodiesel

clear elm
#

That's absolutely perfect, thank you very much for your help!

peak stratus
#

@clear elm when testing, save the script and do F3 + T to reload (ingame)

#

since this is client side only stuff, it is F3 + T

clear elm
#

Ahh okay, this is great, thank you, I shall get to writing the other parts to read the array

#

I shall consider this issue closed