Hub manager
HubManager owns the conduit:hub dimension — a permanent void hub where players wait between games. Mods call registerZone(HubZone) from their onInitialize to claim a pad; on SERVER_STARTED the engine builds a unified end-gateway room sized to fit every registered zone and lays each pad out on a semicircular arc in front of spawn. Each pad gets a floating display, a multi-line hologram, a walk-in trigger AABB, and an ambient particle ring.
When to use it
Section titled “When to use it”- You’re registering a game and want its pad auto-built into the hub (usually via
GameRegistrywhich calls this for you). - You want to update a pad’s status line at runtime (“Lobby 1/8 — waiting for players”).
- You want to teleport a player back to the hub.
package me.zlex.conduit.instance;
public final class HubManager { public static final ResourceKey<Level> HUB;
public static void init(); // call once from your ModInitializer
public static void registerZone(HubZone zone); public static void updateZoneStatus(MinecraftServer server, String zoneId, String text, int argbColor); public static void updateZoneLabel(MinecraftServer server, String zoneId, WorldLabel label);
public static void teleportToHub(ServerPlayer player); public static ServerLevel getHubLevel(MinecraftServer server); public static BlockPos getSpawnPoint(); public static void setSpawnPoint(BlockPos pos);
public static void enableAutoHubOnJoin(); public static @Nullable AABB getZoneAabb(String zoneId);}
public record HubZone( String zoneId, String name, int nameArgb, @Nullable String type, int typeArgb, List<String> description, int descriptionArgb, String status, int statusArgb, @Nullable ItemLike display, Consumer<ServerPlayer> onEntry) {}Example
Section titled “Example”import me.zlex.conduit.instance.HubManager;import me.zlex.conduit.instance.HubZone;import net.fabricmc.api.ModInitializer;import net.minecraft.world.item.Items;
import java.util.List;
public final class MyMod implements ModInitializer {
@Override public void onInitialize() { HubManager.registerZone(new HubZone( /* zoneId */ "my-mod:solo", /* name */ "MY GAME", /* nameArgb */ 0xFFFFD700, /* type */ "Solo", /* typeArgb */ 0xFFAAAAAA, /* description */ List.of("A short rules line.", "Last one standing wins."), /* descriptionArgb */0xFFCCCCCC, /* status */ "Walk in to play", /* statusArgb */ 0xFFFFD700, /* display */ Items.GLASS_BOTTLE, /* onEntry */ p -> MyRound.tryQueue(p)));
HubManager.enableAutoHubOnJoin(); }}- Registration must happen before
SERVER_STARTED. Late registrations log a warning viaConduitLog.HUB_MANAGERand don’t get a pad built until the next server restart. updateZoneStatusis the runtime hook for “queue 3/8” style live updates. It re-pushes the hologram label, so calling it from a tick handler is fine.enableAutoHubOnJoin()routes every joining player to the hub spawn point — useful for hub-first servers.