Lobby staging builder
LobbyStagingBuilder builds the barrier-block “staging box” — a shell of barrier blocks around a centre point, with a configurable floor — that wraps a lobby while players ready up. The geometry is data-driven: it lives in data/conduit/prefabs/default-staging-box.json and is instantiated via SceneStore, then the floor is overwritten in-place with the caller-supplied state so mods can use a coloured floor while keeping a single staging-box shape across all consumers.
When to use it
Section titled “When to use it”- Your lobby has been created and you want the standard pre-game room around it.
- You want to swap the floor for a coloured block (per-mod theme) without changing the walls.
- You want every staging block tracked so the lobby’s tear-down path can revert them.
package me.zlex.conduit.lobby;
public final class LobbyStagingBuilder {
// World-spawn-centered: public static void build(ServerLevel level, BaseLobby lobby, int platformHalf, int ceilingHeight, int y, Function<BaseLobby, BlockState> floorProvider);
// Explicit centre: public static void build(ServerLevel level, BaseLobby lobby, int platformHalf, int ceilingHeight, int y, int cx, int cz, Function<BaseLobby, BlockState> floorProvider);
public static void tearDown(ServerLevel level, BaseLobby lobby);}The built box is (2*platformHalf + 1) × (ceilingHeight + 1) × (2*platformHalf + 1). Tracked positions flow into BaseLobby.stagingBlocks so tearDown can iterate and revert.
Example
Section titled “Example”import me.zlex.conduit.lobby.BaseLobby;import me.zlex.conduit.lobby.LobbyStagingBuilder;import me.zlex.conduit.config.ConduitConfig;import net.minecraft.server.level.ServerLevel;import net.minecraft.world.level.block.Blocks;
public final class MyStaging {
public static void buildFor(ServerLevel level, BaseLobby lobby) { int half = ConduitConfig.defaultStagingHalf(); int height = ConduitConfig.defaultStagingHeight(); int yFloor = 100;
LobbyStagingBuilder.build(level, lobby, half, height, yFloor, /* floor */ l -> Blocks.LIGHT_BLUE_CONCRETE.defaultBlockState()); }
public static void teardownFor(ServerLevel level, BaseLobby lobby) { LobbyStagingBuilder.tearDown(level, lobby); }}- The
floorProvideris a function so you can vary the floor per lobby (e.g. by host’s chosen colour) instead of just per game. - The default-staging-box prefab is shipped with the engine — if it’s missing, the builder throws with a clear message about the engine resource pack not being loaded.
- A future revision is expected to store the
Scenedirectly onBaseLobbyand callscene.remove(); the current path mirrors placed positions intostagingBlocksfor backwards compatibility.