#How to import recipes into another recipe type?
1 messages · Page 1 of 1 (latest)
bump
Kube or addon?
(I know Lemons) he is trying it with KubeJS
yes this is with KubeJS
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
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
Also, i couldn't ,for the life of me ,find the code in the CustomMultiblockBuilder for declaring a machine recipes as steam. Whats the method?
If it's a multiblock you have to a) make it a SteamParallelMultiblockMachine and b) add the SteamParallelMultiblockMachine::recipeModifer to the recipe modifiers
its not that i just add SteamParallelMultiblockMachine::recipeModifer into .recipeModifiers?
no it also needs to be a steam multiblock
the steam multiblock recipe modifier checks for the machine to be a steam multiblock
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'))
yeah good question lemme see if i can figure it out
oh you might need to load the class above
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
was this how you loaded a class in Java?
java.lang.ClassLoader.loadClass(SteamParallelMultiblockMachine, false)
Just Java.loadClass('full path')
and you have to assign that to a var
path is
com.gregtechceu.gtceu.common.machine.multiblock.steam.SteamParallelMultiblockMachine
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?
const SteamMB = Java.loadClass('path') one line
Yeah
Also this
m => new SteamMB(m)
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
bump
Are you copying recipes to another recipe type?
I have done this through json jank in my pack
Currently trying to delcare a custom multiblock as a steam multiblock
Oh I've made steam multiblocks infact I'm the one that prd to make them possible lmao
Errr I may have a test script I used when making steam multis
I'm unsure where
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
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)
Is that hard-coded?
is what hard coded
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
can you send your current script
idk if itd still work
dw about deepa
:3
I'll send asoon as I have access to the script again
I was asking if steam machines not doing any recipes with fluids is hard-coded
yes
uh well
hm
you could add ULV hatches maybe
ig
but they will use steam instead of EU no matter what
that is what I was going for
its bc of conflicts with the steam tank as part of the multi
you cant reliably use fluid recipes on steam machines due to that, singleblocks too
kind of? ghosti had an issue where it tried to use any fluid in the hatches as steam so it didn't run any recipes
ok hi
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
did actually boot after doing that
so funny story
steam multiblock machines can work with fluids
No they can't if you reload the world the tank ordering will reset and recipes will break
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
Try recipes with multiple fluid inputs and a fluid output?
The issue may just be fluid outputs
Unsure
also having this was crashing the server when said multiblock attempted to craft a recipe
my steam fluid extractor seems to be fine
i may test that at some point
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?
im using a steam input hatch for the steam and ULV hatches for the fluids im crafting with
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
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
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? 
no
Oh ok
nvm it seems to be deadset using the ulv hatch as the steam one
and only on this instance of a multi
Yep I told you it was super inconsistent
ah nvm replacing the controller got it to reconsider (???)
yes anytime you form it
I mean yea it reconsiders
it will recheck all the hatches
rotation of a part counts as reforming
Steam stuff would have to be rewritten proly
ghosti has a fix in cosmiccore
in cosmic core
is it a fix in their multi predicate or
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 🙃
you cant
unless you remove the EUt from the recipe
steam multiblocks work by converting EUt -> steam
yeah thats what im going for really
intending on taking the EU/t and swapping it for mB/t of water
you'll still have the issue where the first hatch wont be seen as a fluid inventory
but yea go fori t
if i try hard enough ill figure out how to atleast get it somewhat working
If you're doing Java you can better specify how a multiblock works