#custom steam multiblock machines

23 messages · Page 1 of 1 (latest)

wet pond
#

i have made a code to create custom multiblock steam machines and this is it, its for people to use and have fun

#

here is an example and some explanation

GTCEuStartupEvents.registry('gtceu:machine', event => {
    event.create('large_steam_alloy_smelter', 'multiblock')
        .rotationState(RotationState.NON_Y_AXIS)
        .recipeType('alloy_smelter')
        .machine((holder) => new $SteamMulti(holder, 4))
        .recipeModifier((machine, recipe) => $SteamMulti.recipeModifier(machine, recipe), true)
        .pattern(definition => FactoryBlockPattern.start()
            .aisle('BBBBB', 'CCCCC', 'CCCCC', ' CCC ')
            .aisle('BDDDB', 'CA AC', 'CA AC', ' CCC ')
            .aisle('BDDDB', 'C   C', 'C   C', ' CCC ')
            .aisle('BDDDB', 'CA AC', 'CA AC', ' CCC ')
            .aisle('BBBBB', 'CC@CC', 'CCCCC', ' CCC ')
            .where('C', Predicates.blocks('gtceu:steam_machine_casing')
                .or(Predicates.abilities(PartAbility.STEAM ).setExactLimit(1))
                .or(Predicates.abilities(PartAbility.STEAM_EXPORT_ITEMS ).setExactLimit(1))
                .or(Predicates.abilities(PartAbility.STEAM_IMPORT_ITEMS ).setExactLimit(1)))
            .where("@", Predicates.controller(Predicates.blocks(definition.get())))        
            .where('B', Predicates.blocks('gtceu:bronze_firebox_casing'))
            .where('A', Predicates.blocks('gtceu:bronze_pipe_casing'))
            .where('D', Predicates.blocks('gtceu:bronze_machine_casing'))
            .where(' ', Predicates.any())
            .build())
            .workableCasingRenderer('gtceu:block/casings/solid/machine_casing_bronze_plated_bricks', 'gtceu:block/machines/alloy_smelter', false)

})

there is this part which is the effictiveness of the parallel:

.machine((holder) => new $SteamMulti(holder, 4))

the number is half of the parallel so 4 means it will process 8 recipes, 8 means 16, 2 mean 4 and so on.

#

second part is this:

const $SteamMulti = Java.loadClass('com.gregtechceu.gtceu.common.machine.multiblock.steam.SteamParallelMultiblockMachine')

since gregtech doesnt support steam parallel there had to be a solution for the recipe modifier and thanks to @sinful knot he gave me premission to use his method which is this api call above its placed in a script called api and it only needs to be registered once to work.

outer saffron
#

Hey im sorry for asking such an off topic question but is there any documentation to create own multiblocks i havent found anything again im sorry for oftopic question

frank lintel
outer saffron
#

Okay than ill lean it that way thank you so mutch

frank lintel
#

true steam multis can be made only via core mod

sinful knot
#

ooh, they updated the docs

#

Your best examples would be by looking at other modpacks

#

and seeing how that works

#

for example, the docs say nothing about loading a java class for non normal multiblock logic

#

but moni, SoG, starT all do

#

Feel free to also check out PFT's files if you want as well

outer saffron
#

Dame thank you so mutch i think that will really help

shrewd moon
#

bit late but i got it almost working(??) it says $SteamMulti is not defined?

sinful knot
#

have you loaded the class?

#

const $SteamMulti = Java.loadClass('com.gregtechceu.gtceu.common.machine.multiblock.steam.SteamParallelMultiblockMachine');

shrewd moon
#

where would i add this? sorry im kind of reverse engineering everything atm

#

oh ok i got it working