From c2448cd0f64e4c6ea1102b13d786b75958fc3ab2 Mon Sep 17 00:00:00 2001 From: kross <135918757+krossgg@users.noreply.github.com> Date: Sun, 29 Dec 2024 10:39:13 -0500 Subject: [PATCH] Add multiblock constructors to KJS + lang (#2667) --- .../registrate/MultiblockMachineBuilder.java | 12 ++++++- .../integration/kjs/GregTechKubeJSPlugin.java | 2 ++ .../machine/KJSSteamMachineBuilder.java | 2 +- .../machine/KJSTieredMultiblockBuilder.java | 4 ++- .../kjs/helpers/MachineConstructors.java | 34 +++++++++++++++++++ 5 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/gregtechceu/gtceu/integration/kjs/helpers/MachineConstructors.java diff --git a/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/MultiblockMachineBuilder.java b/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/MultiblockMachineBuilder.java index 1b7871508a..2da6530b57 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/MultiblockMachineBuilder.java +++ b/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/MultiblockMachineBuilder.java @@ -1,5 +1,6 @@ package com.gregtechceu.gtceu.api.registry.registrate; +import com.gregtechceu.gtceu.GTCEu; import com.gregtechceu.gtceu.api.block.IMachineBlock; import com.gregtechceu.gtceu.api.capability.recipe.RecipeCapability; import com.gregtechceu.gtceu.api.data.RotationState; @@ -42,6 +43,7 @@ import com.tterrag.registrate.builders.ItemBuilder; import com.tterrag.registrate.util.nullness.NonNullConsumer; import com.tterrag.registrate.util.nullness.NonNullUnaryOperator; +import dev.latvian.mods.kubejs.client.LangEventJS; import dev.latvian.mods.rhino.util.HideFromJS; import it.unimi.dsi.fastutil.objects.Object2IntMap; import lombok.Getter; @@ -376,6 +378,14 @@ public MultiblockMachineBuilder onBlockEntityRegister(NonNullConsumer