#How to import recipes into another recipe type?

1 messages · Page 1 of 1 (latest)

stoic heart
#

Im trying to make a steam-age fluid solidifier.
As solidifing fluids with steam didn't make sense, I wish to import the recipes from the fluid solidifier (fluid_solidifier) into another recipe type (eg. steam_fluid_solidifier), where I could edit those recipes to use water instead.

How would one do this?

stoic heart
#

bump

somber sapphire
#

Kube or addon?

rocky kite
#

(I know Lemons) he is trying it with KubeJS

stoic heart
#

yes this is with KubeJS

blazing nest
#

Uh the steam recipes don't "use" steam. They use regular recipes with EUt and convert steam to that EUt in their own recipe logic

#

So I don't think it would be possible without making a custom machine

stoic heart
#

i am making this a custom machine so no prob with that

#

my intent was to import the recipes for the fluid solidifer, remove the power consumption from them and like 500mb water

stoic heart
blazing nest
#

If it's a multiblock you have to a) make it a SteamParallelMultiblockMachine and b) add the SteamParallelMultiblockMachine::recipeModifer to the recipe modifiers

stoic heart
#

its not that i just add SteamParallelMultiblockMachine::recipeModifer into .recipeModifiers?

blazing nest
#

no it also needs to be a steam multiblock

#

the steam multiblock recipe modifier checks for the machine to be a steam multiblock

stoic heart
#

yeah ive done that and im getting syntax errors. and i am too dense to figure out my problem here

GTCEuStartupEvents.registry('gtceu:machine', event => { event.create('heating_basin', 'multiblockSteamParallelMultiblockMachine') .recipeModifiers(SteamParallelMultiblockMachine::recipeModifer) //the line in question .rotationState(RotationState.NON_Y_AXIS) .appearanceBlock(GTBlocks.CASING_STEEL_SOLID) .recipeTypes(['heating_basin']) .pattern(definition => FactoryBlockPattern.start() .aisle('CCC', 'GGG') .aisle('CCC', 'G G') .aisle('CKC', 'GGG') .where('K', Predicates.controller(Predicates.blocks(definition.get()))) .where('G', Predicates.blocks('gtceu:steel_firebox_casing').setMinGlobalLimited(5) .or(Predicates.abilities(PartAbility.STEAM_IMPORT_ITEMS).setExactLimit(1)) .or(Predicates.abilities(PartAbility.EXPORT_FLUIDS).setExactLimit(1)) .or(Predicates.abilities(PartAbility.STEAM).setMaxGlobalLimited(1))) .where('C', Predicates.blocks('gtceu:steel_brick_casing'))

blazing nest
#

yeah good question lemme see if i can figure it out

#

oh you might need to load the class above

stoic heart
#

Oh

#

mb

blazing nest
#

i think it doesnt parse java directly

#

load the SteamParallelMultiblockMachine class and then pass uhhhhh

#

theclass::recipeModifier or theclass.recipeModifier

#

could be either

#

uhhhhhhh

#

one second

#

idt your multiblock is being created as a steam one either lemme figure it out

#

I think you need to do event.create('name', 'multiblock', m => new $SteamMultiblock(m)) where $SteamMultiblock is the loaded class

stoic heart
#

was this how you loaded a class in Java?
java.lang.ClassLoader.loadClass(SteamParallelMultiblockMachine, false)

blazing nest
#

Just Java.loadClass('full path')

#

and you have to assign that to a var

#

path is
com.gregtechceu.gtceu.common.machine.multiblock.steam.SteamParallelMultiblockMachine

stoic heart
#

java.loadClass('com.gregtechceu.gtceu.common.machine.multiblock.steam.SteamParallelMultiblockMachine') type SteamMB = 'com.gregtechceu.gtceu.common.machine.multiblock.steam.SteamParallelMultiblockMachine'
like this?

#

oh yeah it shouldnt be just 'type'

#

whats the type?

blazing nest
#

const SteamMB = Java.loadClass('path') one line

stoic heart
#

Oh

#

and then i use SteamMB as the theclass you mentioned?

blazing nest
#

Yeah

stoic heart
#

yes

#

Alright. now it crashes on startup. Looking at the crash report for if its something of my own fault here

#

nvm i dont get it

stoic heart
#

bump

fervent copper
#

I have done this through json jank in my pack

stoic heart
#

Currently trying to delcare a custom multiblock as a steam multiblock

fervent copper
#

Errr I may have a test script I used when making steam multis

#

I'm unsure where

blazing nest
#

oh i forgot about this sorry ill take a look at your script/error later when i get on my pc

#

if you can send your current script that would be helpful ty

fervent copper
#
const SteamParallelMultiblockMachine = Java.loadClass("com.gregtechceu.gtceu.common.machine.multiblock.steam.SteamParallelMultiblockMachine")

GTCEuStartupEvents.registry('gtceu:machine', event => {
    event.create('teststeammultiblock', 'multiblock', (holder) => new SteamParallelMultiblockMachine(holder, 1))
        .rotationState(RotationState.ALL)
        .appearanceBlock(GTBlocks.CASING_BRONZE_BRICKS)
        .recipeType(GTRecipeTypes.FUSION_RECIPES)
        .pattern(definition => FactoryBlockPattern.start()
            .aisle("aaa")
            .aisle("a#a")
            .aisle("aba")
            .where('#', Predicates.any())
            .where('b', Predicates.controller(Predicates.blocks(definition.get())))
            .where('a', Predicates.blocks(GTBlocks.CASING_BRONZE_BRICKS.get())
                .or(Predicates.abilities(PartAbility.STEAM_IMPORT_ITEMS))
                .or(Predicates.abilities(PartAbility.STEAM_EXPORT_ITEMS))
                .or(Predicates.abilities(PartAbility.STEAM).setExactLimit(1))
                .or(Predicates.abilities(PartAbility.IMPORT_FLUIDS).setMaxGlobalLimited(2))
                .or(Predicates.abilities(PartAbility.EXPORT_FLUIDS).setMaxGlobalLimited(2))
            )
            .build())
        .workableCasingRenderer(GTCEu.id("block/casings/solid/machine_casing_bronze_plated_bricks"),
                GTCEu.id("block/multiblock/steam_grinder"))
})```
#

heres what I had when I made my pr

#

but idk if its the same

#

this part maybe diff

#

(also its using fusion as a placeholder recipe type which steam cannot do fluid recipes)

fervent copper
#

the recipe type? lol no

#

this is just my test script

#

rSteamParallelMultiblockMachine(holder, 1))

#

the 1 is parallel amount

#

from how i did it

#

but kross changed things

blazing nest
fervent copper
#

idk if itd still work

blazing nest
#

dw about deepa

fervent copper
#

:3

stoic heart
blazing nest
#

yes

#

uh well

#

hm

#

you could add ULV hatches maybe

#

ig

#

but they will use steam instead of EU no matter what

stoic heart
fervent copper
#

you cant reliably use fluid recipes on steam machines due to that, singleblocks too

sweet cradle
stoic heart
#

afformentioned script

blazing nest
#

so a couple things

#

.recipeModifiers([(m, r) => SteamMB.recipeModifier(m, r)]) this should be your .recipeModifiers line i think

#

actually is that the only thing

#

it might be

stoic heart
#

did actually boot after doing that

stoic heart
fervent copper
#

I did this and it was extremely inconsistent

#

I made a steam fusion reactor to test and it would work if I did fluids in a certain order or something, but every time I reloaded the world it'd break

stoic heart
#

tried reloading the world a few times and it seems to be consistant

#

very odd

fervent copper
#

Try recipes with multiple fluid inputs and a fluid output?

#

The issue may just be fluid outputs

#

Unsure

stoic heart
stoic heart
#

i may test that at some point

fervent copper
#

But from what I did I believe it was reading the wrong tank as it's steam input, which would cause it to no longer see it has steam and function

#

Are you using the steam auto precicate

#

Or regula

#

Maybe the steam input hatch is distinct and this is why there's issues and ur not using it?

stoic heart
#

im using a steam input hatch for the steam and ULV hatches for the fluids im crafting with

fervent copper
#

Hm ok

#

I tried this in Java and kjs before

#

Try fusion recipes or multi fluid

#

Idk

#

Run like a passive cr or mixer fluid recipe and reload world

stoic heart
#

aha

#

it is reading the ULV hatch as a steam input hatch now that ive rotated it

#

ok yeah it seems to take the northern most fluid input hatch as the steam input

fervent copper
#

Oh interesting

#

That must be how steam multis are read by the builder or smtn and it picks the first hatch it sees

#

I mean theoretically it'd work always if you just use on quad hatch? ICANT

blazing nest
#

no

fervent copper
#

Oh ok

blazing nest
#

the entire hatch is used

#

its the first hatch in block-pos order

stoic heart
#

nvm it seems to be deadset using the ulv hatch as the steam one
and only on this instance of a multi

fervent copper
#

Yep I told you it was super inconsistent

stoic heart
#

ah nvm replacing the controller got it to reconsider (???)

blazing nest
#

yes anytime you form it

fervent copper
#

I mean yea it reconsiders

blazing nest
#

it will recheck all the hatches

fervent copper
#

But it's not worth using in a actual pack

#

It's not supposed to be used like this

blazing nest
#

rotation of a part counts as reforming

fervent copper
#

Steam stuff would have to be rewritten proly

sweet cradle
#

ghosti has a fix in cosmiccore

fervent copper
#

in cosmic core

stoic heart
#

i mean

#

if replacing the controller works to reroll the hatches

fervent copper
#

is it a fix in their multi predicate or

stoic heart
#

then that works

#

gonna try to figure out how to replace the steam input with water for the steam solidifier thingy now
heres hoping i can figure it out 🙃

blazing nest
#

you cant

#

unless you remove the EUt from the recipe

#

steam multiblocks work by converting EUt -> steam

stoic heart
#

yeah thats what im going for really
intending on taking the EU/t and swapping it for mB/t of water

blazing nest
#

you'll still have the issue where the first hatch wont be seen as a fluid inventory

#

but yea go fori t

stoic heart
#

if i try hard enough ill figure out how to atleast get it somewhat working

fervent copper
#

If you're doing Java you can better specify how a multiblock works