0x12 C12PacketUpdateSign

Player finishes editing a sign. Sends the block position and four lines of text as IChatComponents.

Serverbound (Client → Server) · PLAY · net/minecraft/network/play/client/C12PacketUpdateSign.java

Published 2026-06-18 · Updated 2026-10-14

playerblocksignchatworld
Comprehensive 7/8

Fields

FieldTypeDescription
positionBlockPosSign block position
linesIChatComponent[4]4 lines of sign text as JSON ChatComponents

Wire Encoding

FieldTypeNotes
PositionPosition (long)BlockPos encoded as long
Line 1Chat Component (JSON)Sign line 1
Line 2Chat Component (JSON)Sign line 2
Line 3Chat Component (JSON)Sign line 3
Line 4Chat Component (JSON)Sign line 4

MCP References

MCPNetHandlerPlayServer.processUpdateSign()

Handler Interface

HNDINetHandlerPlayServer

Notes

Jigsaw 0.26 OPSign module cancels and resends C12 twice to crash the server's sign data structure on vanilla 1.8-1.8.5 servers (exploit patched in 1.8.8+).

Vanilla Source

C12PacketUpdateSign.java73 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.client;
2
3
import java.io.IOException;
4
import net.minecraft.network.Packet;
5
import net.minecraft.network.PacketBuffer;
6
import net.minecraft.network.play.INetHandlerPlayServer;
7
import net.minecraft.util.BlockPos;
8
import net.minecraft.util.IChatComponent;
9
10
public class C12PacketUpdateSign implements Packet<INetHandlerPlayServer>
11
{
12
    private BlockPos pos;
13
    private IChatComponent[] lines;
14
15
    public C12PacketUpdateSign()
16
    {
17
    }
18
19
    public C12PacketUpdateSign(BlockPos pos, IChatComponent[] lines)
20
    {
21
        this.pos = pos;
22
        this.lines = new IChatComponent[] {lines[0], lines[1], lines[2], lines[3]};
23
    }
24
25
    /**
26
     * Reads the raw packet data from the data stream.
27
     */
28
    public void readPacketData(PacketBuffer buf) throws IOException
29
    {
30
        this.pos = buf.readBlockPos();
31
        this.lines = new IChatComponent[4];
32
33
        for (int i = 0; i < 4; ++i)
34
        {
35
            String s = buf.readStringFromBuffer(384);
36
            IChatComponent ichatcomponent = IChatComponent.Serializer.jsonToComponent(s);
37
            this.lines[i] = ichatcomponent;
38
        }
39
    }
40
41
    /**
42
     * Writes the raw packet data to the data stream.
43
     */
44
    public void writePacketData(PacketBuffer buf) throws IOException
45
    {
46
        buf.writeBlockPos(this.pos);
47
48
        for (int i = 0; i < 4; ++i)
49
        {
50
            IChatComponent ichatcomponent = this.lines[i];
51
            String s = IChatComponent.Serializer.componentToJson(ichatcomponent);
52
            buf.writeString(s);
53
        }
54
    }
55
56
    /**
57
     * Passes this Packet on to the NetHandler for processing.
58
     */
59
    public void processPacket(INetHandlerPlayServer handler)
60
    {
61
        handler.processUpdateSign(this);
62
    }
63
64
    public BlockPos getPosition()
65
    {
66
        return this.pos;
67
    }
68
69
    public IChatComponent[] getLines()
70
    {
71
        return this.lines;
72
    }
73
}

Deobfuscated MCP 1.8.9 source of C12PacketUpdateSign, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/client/C12PacketUpdateSign.java) at build time and verified present.

Deep Dive

Role in the protocol

C12 commits sign text: a BlockPos plus four IChatComponent lines. GuiEditSign sends it on close, and the server writes the lines into the tile entity. It is one of the few serverbound packets that carries structured chat components rather than plain strings, which makes it a favorite vector for chat-parser and logging exploits.

Vanilla handling

processUpdateSign loads the block and requires the tile entity to be a TileEntitySign, then checks isEditable and that the editing player matches; a failed check logs a warning and returns. Each line is re-wrapped as new ChatComponentText with formatting codes stripped (EnumChatFormatting.getTextWithoutFormattingCodes), so the server discards JSON structure and colors before storing. No length cap is applied at this layer in the bundled 1.8.9 sources.

Why clients touch it

Three corpus hits. Rise 5.99's Crasher Sign mode injects the Log4Shell string as a sign line at BlockPos.ORIGIN, and Freecam allow-lists C12 so sign edits survive a freecam session. November Recode 2.0 maps C12PacketUpdateSign to wire id 0x12 in its LuaEventPacket wrapper so Lua scripts can recognize the packet by id. No client ships a SignSpoof or colored-sign module; the packet is otherwise vanilla-only across the corpus.

Exploit surface

The interesting detail is where the payload lands: sign text is persisted to the world and re-broadcast, so a crafted line reaches every chunk viewer and any plugin that logs or formats tile entity data. The 1.8.x sign-crash (resending C12 twice against a vanilla bug) predates these clients and is not present in the corpus. Because the tile entity and ownership checks happen before any text processing, anonymous positions like BlockPos.ORIGIN are silently ignored unless a sign actually sits there.

Server-Side Handling

processUpdateSign: block loaded check, TileEntitySign cast, isEditable and owner match, then per-line sanitization into plain ChatComponentText with formatting codes stripped, markDirty and markBlockForUpdate. A non-matching owner logs 'just tried to change non-editable sign' and drops the packet.

Protocol Analysis

BlockPos (long-encoded) followed by four length-prefixed chat component JSON strings. Valid only while the client is in a sign-editing GUI, though the server never verifies that state, only the tile entity's editable flag. The four lines are not length-capped in 1.8.9 server code.

Anti-Cheat Landscape

No anti-cheat measures C12; it carries no movement signal. Server-side plugins that sanitize or log sign text are the only watchers, and they operate on content. Spamming C12 at arbitrary positions costs one tile entity lookup per packet and is the only measurable abuse.

implementation Implementation Cases

The sign-text commit packet. No SignSpoof or color-sign module exists in the corpus; C12 shows up only as Rise 5.99's Log4Shell crash carrier, a freecam whitelist entry and November Recode 2.0's Lua packet-id map.

Crasher (Sign) (Rise 5.99)

Send a sign update carrying the Log4Shell lookup string to servers whose logging pipeline formats packet content through log4j.

On PreMotionEvent, Sign mode builds a 4-line IChatComponent array where line 0 is the string ${jndi:rmi://localhost:3000} and sends it at BlockPos.ORIGIN. Disables itself after one shot when using the Log4J chat variant.

Source: Rise 5.99, dev/rise/module/impl/other/Crasher.java

Vanilla hook: onPreMotion (PreMotionEvent), PacketUtil.sendPacket.
Needs a vulnerable server; on patched servers the string is stored as literal sign text. The packet rate is one per tick, low enough to evade rate-based logging guards.
Variations: The same module carries the identical string in the Log4J mode through C01PacketChatMessage and in Book mode through C0EPacketClickWindow.
Freecam (whitelist) (Rise 5.99)

Pass C12 through the freecam packet whitelist so sign edits still reach the server while the camera is detached.

The onPacketSend allow list includes C12 alongside C10, C0E, C16 and C02; all other serverbound packets are cancelled during the freecam session.

Source: Rise 5.99, dev/rise/module/impl/render/Freecam.java

Vanilla hook: onPacketSend (PacketSendEvent).
No detection relevance beyond the movement suppression the whitelist is part of.
Variations: No comparable whitelist in the other 7 clients.
LuaEventPacket (script bridge) (November Recode 2.0)

Expose the serverbound packet id space to the Lua scripting API: C12 resolves to id 0x12 so scripts can recognize sign commits by id.

A static block maps every serverbound play packet class to its 1.8.9 wire id, C12PacketUpdateSign to 0x12. The constructor resolves the id from the EventPacket payload via getOrDefault (falling back to -1) and stamps a direction string ('out' for EventPacket.Out, 'in' otherwise); Lua event wrappers then pass the id and direction to scripts. The map exists because runtime obfuscation would break reflection-based lookups.

Source: November Recode 2.0, scripting/wrapper/event/LuaEventPacket.java

Vanilla hook: EventPacket.In/Out bus events translated into the Lua wrapper; no packet is constructed or sent here.
None: the wrapper only reads the packet class. The id map gives scripts awareness of sign commits, not the ability to forge them.
Variations: Rise 5.99 is the only client with active C12 module logic (Crasher, Freecam); November Recode 2.0's hit is passive plumbing.
C12 is reached through generic PacketSendEvent handling in Rise 5.99; November Recode 2.0 sees it only through the LuaEventPacket wrapper.
Rise 5.99 is the only client with module-level C12 references. All other clients emit C12 exclusively from the vanilla GuiEditSign close path; November Recode 2.0 additionally maps it in the Lua wrapper.

anticheat Anti-Cheat Checks

The sign-update packet is a thin but real anticheat surface. NoCheatPlus runs its AutoSign blockplace check on sign edits, timing the edit against the placement and the line content, and Intave kicks players whose sign lines exceed a length limit, which is the crash-exploit angle of this packet.

AutoSign (NoCheatPlus) (Updated-NoCheatPlus-NoCheatPlus)

Catch instant sign-text macros that fill all four lines faster than a human can type.

After a sign is placed, the blockplace listener stores a block hash and the open time. On the sign edit, the check compares the block hash, then estimates the minimum human edit time from the line count and the distinct characters (150 ms base, 50 ms per extra line, 50 ms per character). An edit faster than the estimate flags, with the violation level scaled by the time deficit.

Detects: Auto-sign macros, instant sign spam, and sign edits sent against a different block than the one placed.

Source: Updated-NoCheatPlus-NoCheatPlus, NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/AutoSign.java

Variations: Intave's ItemCrashTracker instead validates sign content length (see next entry); Vrekt-Arc-v2 and Artemis only ship UpdateSign wrappers.
ItemCrashTracker sign limit (Intave) (intave-intave)

Block the sign-update crash exploit that sends oversized line components.

Subscribes to the UPDATE_SIGN packet, reads the four chat components, and if any JSON serialization exceeds 500 characters it cancels the packet and kicks the player. The same module also carries Intave's window-click crash fix.

Detects: Sign update packets with oversized or malformed line components, which crash vanilla sign handling on 1.8 servers.

Source: intave-intave, src/main/java/de/jpx3/intave/module/tracker/player/ItemCrashTracker.java

Variations: No other anticheat in the corpus validates sign content; the rest ignore the packet entirely.

Wiki Cross-Reference

BlockPos coded as one 8-byte long followed by 4 chat-component JSON strings capped at 384 chars each.

Server requires a loaded TileEntitySign that is editable by that player, else logs and drops it.

Stored lines are flattened to plain text with formatting codes stripped before markDirty and update.

MCP 1.8.9 C12PacketUpdateSign implements Packet dispatching to INetHandlerPlayServer.processUpdateSign; wire serde is readPacketData/writePacketData via readBlockPos, readStringFromBuffer.

1.8.9 callers: GuiEditSign.onGuiClosed sends new C12PacketUpdateSign (line 59): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/client/gui/inventory/GuiEditSign.java

Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.