#How to make machines support laser hatches in KubeJS?

26 messages · Page 1 of 1 (latest)

near cove
#

I want to add a powerful generator to the game that supports laser hatches. I tried using ProbeJS for code autocompletion, but couldn't find any "support" or "laser" related entries. I've searched both the wiki and Discord regarding laser hatch content, but haven't found clear directional results.

Note: As my native language isn't English, this content was translated via LLM. Original Chinese version below:

kubejs如何使机器支持激光仓
我想为游戏添加一个强大的发电机, 其支持激光仓, 我试图使用probejs进行代码补全, 但并未补全到support或者laser相关的项. 我已在wiki和discord上搜索laser hatch相关内容但并未找到明确指向性的结果.

winged halo
#
           .or(Predicates.abilities(PartAbility.MAINTENANCE).setMaxGlobalLimited(1))
           .or(Predicates.abilities(PartAbility.PARALLEL_HATCH).setMaxGlobalLimited(1))
           .or(Predicates.abilities(PartAbility.INPUT_LASER).setMaxGlobalLimited(1))
           .or(Predicates.autoAbilities(definition.getRecipeTypes())))```
#

🫡

#

oh ye, output

#

lemme grab the part ability of that rq

#

.or(Predicates.abilities(PartAbility.OUTPUT_LASER).setMaxGlobalLimited(1))

#

that is a list of all the part abilities

near cove
#

thank you💖 i really dont think laser hatch support is in vaild block defineation i think it in some function when u build muitiblock btw is there a way to make a 64a regular energy hatch

winged halo
#

yes, that is what part ability means

#

SUBSTATION_INPUT_ENERGY

#

that is the part ability for the 64a hatches

#

.or(Predicates.abilities(PartAbility.MAINTENANCE).setMaxGlobalLimited(1)) this is the part ability section

near cove
#

actually thers no 64a hatch in vanilla gtm

winged halo
#

there is

near cove
#

what

winged halo
#

the substation hatches

near cove
#

oh learnd

#

so can u modfiy vanilla muitiblocks to make they compactable with 64a

winged halo
#

yes, but it's complicated

#
 * Lowers the tiering of Active Transformers from LuV to IV - script 1 of 2.
 * - Replaces the Superconducting coil in the core of the Active Transformer with High Power casing
 */
let ActiveTransformerMachine = Java.loadClass("com.gregtechceu.gtceu.common.machine.multiblock.electric.ActiveTransformerMachine")
let SupplierMemoizer = Java.loadClass("com.gregtechceu.gtceu.utils.SupplierMemoizer")

// Function<MultiblockMachineDefinition, BlockPattern>
let active_transformer_pattern = (definition) => FactoryBlockPattern.start()
    .aisle("XXX", "XXX", "XXX")
    .aisle("XXX", "XCX", "XXX")
    .aisle("XXX", "XSX", "XXX")
    .where("S", Predicates.controller(Predicates.blocks(GTMultiMachines.ACTIVE_TRANSFORMER.get())))
    .where("X", Predicates.blocks(GTBlocks.HIGH_POWER_CASING.get()).setMinGlobalLimited(12)
        .or(ActiveTransformerMachine.getHatchPredicates()))
        .where("C", Predicates.blocks("kubejs:conductive_honey_coil"))
    .build()

// Set the pattern for Active Transformer
StartupEvents.postInit(event => {
    GTMultiMachines.ACTIVE_TRANSFORMER.setPatternFactory(SupplierMemoizer.memoize(() => active_transformer_pattern.apply(GTMultiMachines.ACTIVE_TRANSFORMER)))
})
#

and the code is very different per each multi

near cove
#

ok get it

winged halo
#

do you want to lock your multi to a certain tier of hatch?

#

ie, any ev hatch from 2a(normal) to 64a?

near cove
#

no need for that now xd thank u very much