0x10 S10PacketSpawnPainting

Spawns a painting entity with type, position, and facing direction.

Clientbound (Server → Client) · PLAY · net/minecraft/network/play/server/S10PacketSpawnPainting.java

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

entityspawnpainting
Complete 6/8

Fields

FieldTypeDescription
entityIdVarIntEntity ID
titleStringPainting art name
posBlockPosPainting anchor position
directionbyte0=south, 1=west, 2=north, 3=east

Wire Encoding

FieldTypeNotes
Entity IDVarInt
TitleStringArt name ("Kebab", "Alban", etc.)
PositionBlockPos (long)
Directionbyte0-3

MCP References

MCPNetHandlerPlayClient.handleSpawnPainting()

Handler Interface

HNDINetHandlerPlayClient

Vanilla Source

S10PacketSpawnPainting.java79 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.entity.item.EntityPainting;
5
import net.minecraft.network.Packet;
6
import net.minecraft.network.PacketBuffer;
7
import net.minecraft.network.play.INetHandlerPlayClient;
8
import net.minecraft.util.BlockPos;
9
import net.minecraft.util.EnumFacing;
10
11
public class S10PacketSpawnPainting implements Packet<INetHandlerPlayClient>
12
{
13
    private int entityID;
14
    private BlockPos position;
15
    private EnumFacing facing;
16
    private String title;
17
18
    public S10PacketSpawnPainting()
19
    {
20
    }
21
22
    public S10PacketSpawnPainting(EntityPainting painting)
23
    {
24
        this.entityID = painting.getEntityId();
25
        this.position = painting.getHangingPosition();
26
        this.facing = painting.facingDirection;
27
        this.title = painting.art.title;
28
    }
29
30
    /**
31
     * Reads the raw packet data from the data stream.
32
     */
33
    public void readPacketData(PacketBuffer buf) throws IOException
34
    {
35
        this.entityID = buf.readVarIntFromBuffer();
36
        this.title = buf.readStringFromBuffer(EntityPainting.EnumArt.field_180001_A);
37
        this.position = buf.readBlockPos();
38
        this.facing = EnumFacing.getHorizontal(buf.readUnsignedByte());
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.writeVarIntToBuffer(this.entityID);
47
        buf.writeString(this.title);
48
        buf.writeBlockPos(this.position);
49
        buf.writeByte(this.facing.getHorizontalIndex());
50
    }
51
52
    /**
53
     * Passes this Packet on to the NetHandler for processing.
54
     */
55
    public void processPacket(INetHandlerPlayClient handler)
56
    {
57
        handler.handleSpawnPainting(this);
58
    }
59
60
    public int getEntityID()
61
    {
62
        return this.entityID;
63
    }
64
65
    public BlockPos getPosition()
66
    {
67
        return this.position;
68
    }
69
70
    public EnumFacing getFacing()
71
    {
72
        return this.facing;
73
    }
74
75
    public String getTitle()
76
    {
77
        return this.title;
78
    }
79
}

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

Deep Dive

Role in the protocol

The spawn packet for painting entities, and the only spawn packet that identifies its entity by a String art title instead of a numeric type code. The payload is entity id, the art name (Kebab, Alban, Aztec and friends), a BlockPos anchor and a direction byte (0=south, 1=west, 2=north, 3=east). EntityTrackerEntry.getPacket emits it for EntityPainting, and the client resolves the title through the EnumArt table, which fixes the artwork's pixel dimensions and therefore how much wall space the painting occupies.

Vanilla handling

handleSpawnPainting reads the title, position and direction, then constructs an EntityPainting at the anchor block with the facing applied. The client-side placement uses the EnumArt dimensions to compute the entity's bounding box against the wall; a title that does not map to a known art falls back to the default 16x16 Kebab art. Server side the packet is produced straight from the tracked EntityPainting.

Why clients touch it

None of the 8 reference clients reference S10 outside the bundled vanilla files and Rise 6.1.30/6.2.4 NetworkAPI.java, which lists the class in the scripting registry. This is the honest, expected outcome: paintings are stationary cosmetic entities with no combat value, ESP implementations filter them from entity lists, and KillAura never targets them. In this corpus the packet is pure vanilla.

Exploit surface

Minimal. The art-title String is a lookup key into a fixed EnumArt table, so a bogus title degrades to default art rather than crashing. The direction byte is used as an index into a facing array and is not range-checked by the vanilla handler, the only hardening gap of note. Realistically there is nothing here for either cheats or anti-cheats; the packet matters only for protocol completeness and for proxies that must re-serialize it verbatim.

Server-Side Handling

EntityTrackerEntry.getPacket returns new S10PacketSpawnPainting((EntityPainting) trackedEntity) when the tracked entity is a painting; the constructor snapshots the art title from the EntityPainting's EnumArt, the block position and the facing direction. The client handler creates the entity and places it against the wall using the EnumArt dimensions.

Protocol Analysis

VarInt entity id, then a length-prefixed String art title, then a BlockPos packed as a single long, then a direction byte. Direction semantics are reversed from the visual: 0 faces south, 1 west, 2 north, 3 east. The title string is not validated against EnumArt by the handler, so unknown art names silently fall back to the default painting.

Anti-Cheat Landscape

Nothing to flag: the packet is clientbound, cosmetic and server-authored. Anti-cheats and anti-exploit plugins ignore paintings entirely, and no reference client touches the packet. The only mitigation in the wider ecosystem is the generic entity-spawn rate cap that also covers painting floods used as a minor lag vector.

implementation Implementation Cases

The spawn packet for paintings, identified by art title rather than type code. Zero module hits across the 8 clients: the only non-vanilla reference is Rise's NetworkAPI script registry. Documented honestly as a pure-vanilla packet whose only notable detail is the EnumArt dimension lookup and the unvalidated direction byte.

Only Rise 6.1.30/6.2.4 differ from vanilla, and only by listing S10PacketSpawnPainting.class in NetworkAPI's script packet registry; every other corpus reference is the bundled vanilla code.

anticheat Anti-Cheat Checks

The painting spawn packet has zero hits in the 50-anticheat corpus. Paintings are cosmetic stationary entities; the packet carries an art title, a BlockPos and a direction byte, and no anticheat references it. The only hardening gap of note, the unvalidated direction byte, is an exploit-surface footnote, not a detection surface.

Wiki Cross-Reference

VarInt entityId, art-title string (Kebab, Alban, etc.), anchor BlockPos as long, direction byte 0 south 1 west 2 north 3 east.

Client resolves size from the EnumArt table; unknown titles fall back to default art instead of crashing.

MCP 1.8.9 S10PacketSpawnPainting implements Packet dispatching to INetHandlerPlayClient.handleSpawnPainting; wire serde is readPacketData/writePacketData via readBlockPos, readStringFromBuffer, readUnsignedByte, readVarIntFromBuffer.

1.8.9 callers: EntityTrackerEntry.? sends new S10PacketSpawnPainting (line 603): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/EntityTrackerEntry.java

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

Vanilla Internals

Full 1.8.9 logic-class sources that send or handle this packet, stored verbatim.