Network payloads
conduit-render is server-authoritative: every renderable surface flows from the server through one of eight named payloads. The engine ModInitializer registers all of them once; consumer mods don’t touch the registration. This page is a quick reference for what’s on the wire — useful when you’re debugging with a packet sniffer or writing a vanilla-client chat fallback.
When to read this
Section titled “When to read this”- You’re investigating a “client doesn’t see the screen” bug and want to confirm the payload was sent.
- You’re writing tests against the wire format and need to know the type signatures.
- You’re considering whether to add a new payload (don’t, if an existing one would do).
Payload types
Section titled “Payload types”Screens — me.zlex.conduit.screen.packet
Section titled “Screens — me.zlex.conduit.screen.packet”| Payload | Direction | Body |
|---|---|---|
ShowScreenPayload | S → C | ScreenDef + ScreenContent |
HideScreenPayload | S → C | screen id (int) |
ButtonClickPayload | C → S | screen id + button id (string) |
TextInputChangePayload | C → S | screen id + field id + new value |
Labels — me.zlex.conduit.label.packet
Section titled “Labels — me.zlex.conduit.label.packet”| Payload | Direction | Body |
|---|---|---|
ShowLabelPayload | S → C | LabelDef + WorldLabel |
HideLabelPayload | S → C | label id (int) |
Block displays — me.zlex.conduit.display.packet
Section titled “Block displays — me.zlex.conduit.display.packet”| Payload | Direction | Body |
|---|---|---|
ShowBlockDisplayPayload | S → C | id + dimension + pos + item identifier + BlockDisplaySpec |
HideBlockDisplayPayload | S → C | display id (int) |
All payloads use FriendlyByteBuf encoding via the element types’ own write/read methods.
Vanilla-client fallback
Section titled “Vanilla-client fallback”Every Server*Manager send path gates on ServerPlayNetworking.canSend(player, TYPE). Vanilla clients get a silent no-op — your mod is responsible for sending an equivalent chat-text fallback if non-engine clients matter to your game.
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;import me.zlex.conduit.screen.packet.ShowScreenPayload;
if (!ServerPlayNetworking.canSend(player, ShowScreenPayload.TYPE)) { player.sendSystemMessage(Component.literal("[lobby] " + tagline)); return;}Auto-id ranges
Section titled “Auto-id ranges”| System | Auto-id start | World-wide editor start |
|---|---|---|
| Screens | 1000 | — |
| Labels | 5000 | 6000 |
| Block displays | 9000 | 10000 |
Pick stable caller-managed ids outside these ranges to avoid collisions.
- The engine’s payloads are registered by
ConduitRenderMod.onInitialize. Don’t re-register them. - Adding a new payload is a new class in the relevant
packetsubpackage plus a registration line — both well-trodden patterns; copy any existing payload. - If you need a debug log of every payload sent, the easiest place is to add a wrapper around
ServerPlayNetworking.sendin your own mod rather than mixing into the engine.