Factory Master Switch & Bus
Split a growing base into dedicated PLCs—one Master PLC in your control room (with a physical master switch lever and bulk fuel supply) and any number of Workshop PLCs in separate rooms—connected through a single Hub. Flip the master lever off and every workshop PLC pauses cleanly; share common stocking helpers through a Programmer Library module so you write the logic once.

World setup
Section titled “World setup”- Connect your Master PLC, Workshop PLC(s), and one Hub onto the same cable segment (or linked via Wireless Gateway/Node).
- Right-click the Hub:
- Rename it to
main. - On the Members tab, click Join for both PLCs.
- On the Registers tab, add a
boolregister namedenabledwith defaultfalse. - On the Channels tab, add an Item channel named
fuel_bus.
- Rename it to
- On the Master PLC, bind:
master_lever(Redstone Expansion, Direction = Input) next to your control-room leverbulk_coal(Item Expansion) on your central fuel storage
- On the Workshop PLC, bind:
local_bin(Item Expansion) on the workshop’s fuel buffer chest
Step 1: Save the shared library module
Section titled “Step 1: Save the shared library module”Open your PLC Programmer (or Browser Editor), create a library entry named bus_lib, and save this helper:
FUEL_TAG = "#minecraft:coals"
def top_up(src, dst, target, key=FUEL_TAG): need = target - dst.count(key) if need > 0: move(src, dst, need, key=key)Step 2: Upload to the Master PLC
Section titled “Step 2: Upload to the Master PLC”Upload through your PLC Programmer so bus_lib gets bundled into the PLC:
load("bus_lib", "top_up")
MAIN = hub("main")ON = MAIN.register("enabled")BUS = MAIN.channel("fuel_bus")LEVER = point("master_lever/redstone")BULK = point("bulk_coal/item")
def scan(): enabled = LEVER.get() > 0 ON.set(enabled)
# Keep 64 coal buffered in the shared Hub channel while factory is enabled if enabled: top_up(BULK, BUS, 64)Step 3: Upload to each Workshop PLC
Section titled “Step 3: Upload to each Workshop PLC”load("bus_lib", "top_up")
MAIN = hub("main")ON = MAIN.register("enabled")BUS = MAIN.channel("fuel_bus")BIN = point("local_bin/item")
def scan(): if not ON.get(): return
# Pull from the shared Hub channel whenever local fuel drops below 32 top_up(BUS, BIN, 32)Why this works
Section titled “Why this works”- Each PLC still owns only its own Interfaces—no naming collisions between rooms.
MAIN.channel("fuel_bus")acts like a shared Tier 3 buffer right on the Hub: the Master PLC refills it from bulk storage, and any number of Workshop PLCs draw from it on demand.- Because
bus_libcannot declare registers, the Hub register lives cleanly in each PLC’s top level whiletop_up()stays reusable everywhere.
Ways to tweak it
Section titled “Ways to tweak it”- Add a heartbeat for safety: Remember that if the Master PLC stops or loses power,
enabledstays at its last value. Add anintHub registermaster_tickthat the Master PLC updates tonow()each scan, and have workshops requirenow() - TICK.get() < 100. - Add fluid or energy channels: A single Hub holds up to 8 channels across Items, Fluids, and Energy—add a
power_busEnergy channel orsteam_busFluid channel alongsidefuel_bus.
Not an official Minecraft website. Not approved by or associated with Mojang or Microsoft.