Skip to content

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.

  • 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).
PayloadDirectionBody
ShowScreenPayloadS → CScreenDef + ScreenContent
HideScreenPayloadS → Cscreen id (int)
ButtonClickPayloadC → Sscreen id + button id (string)
TextInputChangePayloadC → Sscreen id + field id + new value
PayloadDirectionBody
ShowLabelPayloadS → CLabelDef + WorldLabel
HideLabelPayloadS → Clabel id (int)

Block displays — me.zlex.conduit.display.packet

Section titled “Block displays — me.zlex.conduit.display.packet”
PayloadDirectionBody
ShowBlockDisplayPayloadS → Cid + dimension + pos + item identifier + BlockDisplaySpec
HideBlockDisplayPayloadS → Cdisplay id (int)

All payloads use FriendlyByteBuf encoding via the element types’ own write/read methods.

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;
}
SystemAuto-id startWorld-wide editor start
Screens1000
Labels50006000
Block displays900010000

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 packet subpackage 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.send in your own mod rather than mixing into the engine.