GregTechCEu Modern

GregTechCEu Modern

6M Downloads

add more kubejs api

gjmhmm8 opened this issue · 7 comments

commented

Cross-mod Integration

No response

Feature Description

Now it is not possible to customize machines that generate computing power.
I hope to be able to define machines that can generate computing power using kubejs, rather than just using them.
#1137

commented

in the recipe.
.CWUt(-100) to output 100 CWU for example.

commented

also possible with the same system.

How to do it with she same system

commented

also possible with the same system.

commented

in the recipe. .CWUt(-100) to output 100 CWU for example.

I tried, but it couldn’t output computing power. Please give me a complete example machine.
image

commented
gtr.greenhouse("123")
    .EUt(1024)
    .CWUt(-1000)
    .circuit(10)
commented

is that a multiblock?

commented

is that a multiblock?

yes
event.create("greenhouse")
.setEUIO("in")
.setSlotOverlay(false, false, GuiTextures.SOLIDIFIER_OVERLAY)
.setMaxIOSize(3, 4, 1, 0)
.setProgressBar(GuiTextures.PROGRESS_BAR_BATH, FillDirection.LEFT_TO_RIGHT)
.setSound(GTSoundEntries.COOLING)
event.create("greenhouse", "multiblock")
.rotationState(RotationState.NON_Y_AXIS)
.recipeType("greenhouse")
.appearanceBlock(GTBlocks.MACHINE_CASING_ULV)
.recipeModifier(GTRecipeModifiers.ELECTRIC_OVERCLOCK.apply(OverclockingLogic.NON_PERFECT_OVERCLOCK))
.pattern((definition) =>
FactoryBlockPattern.start()
.aisle("0BBB0", "0BBB0", "0BBB0", "0BBB0")
.aisle("BBBBB", "B###B", "B###B", "BGGGB")
.aisle("BBBBB", "B###B", "B###B", "BGGGB")
.aisle("BBBBB", "B###B", "B###B", "BGGGB")
.aisle("0BBB0", "0BEB0", "0BBB0", "0BBB0")
.where("E", Predicates.controller(Predicates.blocks(definition.get())))
.where("G", Predicates.blocks("gtceu:tempered_glass"))
.where("B",
Predicates.blocks("gtceu:ulv_machine_casing").setMinGlobalLimited(40)
.or(Predicates.autoAbilities(definition.getRecipeTypes()))
.or(Predicates.abilities(PartAbility.MAINTENANCE).setExactLimit(1))
.or(Predicates.abilities(PartAbility.COMPUTATION_DATA_TRANSMISSION))
)
.where("#", Predicates.air())
.where("0", Predicates.any())
.build())
.workableCasingRenderer(
"gtceu:block/casings/voltage/ulv/side",
"gtceu:block/multiblock/implosion_compressor", false
)