Server label manager
ServerLabelManager shows floating text labels in 3D world space. Labels render through the same in-world screen path as panels (so depth handling and font rendering reuse the proven code), with two scopes: per-player (show/hide) for ephemeral markers, and world-wide (worldShowLabel/worldHide) for permanent fixtures like zone signs that are auto-re-sent to joining players.
When to use it
Section titled “When to use it”- You’re putting “WALK IN TO PLAY” above a hub pad.
- You’re labelling a podium block “1st” / “2nd” / “3rd” at the end of a round.
- You want a transparent hologram that looks like a floating chat overlay, or a bordered panel.
package me.zlex.conduit.label;
public final class ServerLabelManager { public static void init(); // call once from your ModInitializer
// Per-player: public static int show(ServerPlayer player, Vec3 pos, Vec3 normal, WorldLabel label); public static void hide(ServerPlayer player, int id);
// World-wide (re-sent on join): public static int worldShowLabel(MinecraftServer server, ResourceKey<Level> dimension, int id, Vec3 pos, Vec3 normal, WorldLabel label); public static void worldHide(MinecraftServer server, int id);}
public final class WorldLabel { public enum RowKind { HEADER, SUBHEADER, TEXT } public record Line(String text, int argbColor, float scale, boolean shadow, RowKind kind) {}
public static Builder builder(); public static Builder hologram(); // transparent background, no border public static Builder panel(); // dark panel with border
public static WorldLabel titleSubtitle(String title, String subtitle, boolean transparent, boolean border);}Example
Section titled “Example”import me.zlex.conduit.label.ServerLabelManager;import me.zlex.conduit.label.WorldLabel;import net.minecraft.server.MinecraftServer;import net.minecraft.world.phys.Vec3;
public final class HubSignage {
public static void paintWelcomeSign(MinecraftServer server) { WorldLabel sign = WorldLabel.hologram() .line("WELCOME TO CONDUIT", 0xFFFFD700, WorldLabel.RowKind.HEADER) .line("Pick a pad to play", 0xFFCCCCCC, WorldLabel.RowKind.SUBHEADER) .line("Or run /conduit list", 0xFF888888, WorldLabel.RowKind.TEXT) .build();
int id = 6100; // outside the 5000+ auto range ServerLabelManager.worldShowLabel(server, me.zlex.conduit.instance.HubManager.HUB, id, new Vec3(0.5, 105, 0.5), new Vec3(0, 0, 1), sign); }}- Call
init()once from yourModInitializer. The engine’s own initializer already does this — only matters if you’re using the module standalone. - Auto-assigned ids start at 5000. Editor-placed world ids start at 6000; pick stable ids outside both ranges to avoid collision.
WorldLabel.titleSubtitleis a one-liner for “header + smaller line under it” — handy for hub holograms.