Skip to content

Commit aff26c3

Browse files
committed
ghost circuit config
1 parent 09565d9 commit aff26c3

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/main/java/com/gregtechceu/gtceu/common/machine/trait/ProgrammableCircuitSlotTrait.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import com.gregtechceu.gtceu.common.item.behavior.IntCircuitBehaviour;
1717
import com.gregtechceu.gtceu.common.mui.GTMuiWidgets;
1818

19+
import com.gregtechceu.gtceu.config.ConfigHolder;
1920
import net.minecraft.world.item.crafting.Ingredient;
2021

2122
import brachy.modularui.screen.ModularPanel;
@@ -63,7 +64,7 @@ public void setCurrentCircuit(int circuit) {
6364

6465
@Override
6566
public void attachLeftConfigurators(Flow flow, ModularPanel<?> panel, PanelSyncManager syncManager) {
66-
if (!enabled) return;
67+
if (!enabled || !ConfigHolder.INSTANCE.machines.ghostCircuit) return;
6768
flow.child(GTMuiWidgets.createCircuitSlotPanel(this, panel, syncManager));
6869
}
6970

@@ -99,7 +100,7 @@ public IO getCapabilityIO() {
99100
@Override
100101
public List<Ingredient> handleRecipeInner(IO io, GTRecipe recipe, List<Ingredient> left,
101102
boolean simulate) {
102-
if (!enabled) return left;
103+
if (!enabled | !ConfigHolder.INSTANCE.machines.ghostCircuit) return left;
103104
return NotifiableItemStackHandler.handleRecipe(io, recipe, left, simulate, getHandlerIO(), storage);
104105
}
105106

src/main/java/com/gregtechceu/gtceu/config/ConfigHolder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,9 @@ public static class MachineConfigs {
572572
"Default: true" })
573573
@Configurable.Synchronized
574574
public boolean gt6StylePipesCables = true;
575+
@Configurable.Comment({ "Whether the machine's circuit slot need to be inserted a real circuit." })
576+
@Configurable.Synchronized
577+
public boolean ghostCircuit = true;
575578
@Configurable
576579
@Configurable.Comment({ "Whether to add a \"Bedrock Ore Miner\" (also enables bedrock ore generation)",
577580
"Default: false" })

0 commit comments

Comments
 (0)