0x31 S31PacketWindowProperty

Updates a single property in a container (enchantment level, furnace burn time, brewing progress, etc.).

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

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

inventorycontainerproperty
Comprehensive 7/8

Fields

FieldTypeDescription
windowIdbyteWindow ID
propertyIdshortProperty index
valueshortProperty value

Wire Encoding

FieldTypeNotes
Window IDunsigned byte
Propertyshort0-3=enchant levels, 0=furnace burn, etc.
Valueshort

MCP References

MCPNetHandlerPlayClient.handleWindowProperty()

Handler Interface

HNDINetHandlerPlayClient

Notes

Property IDs vary by container type. Enchantment table: 0=top level, 1=middle, 2=bottom. Furnace: 0=burn time, 1=current item progress, 2=total cook time. Brewing stand: 0=brew time. Beacon: 0=power level.

Vanilla Source

S31PacketWindowProperty.java67 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.network.Packet;
5
import net.minecraft.network.PacketBuffer;
6
import net.minecraft.network.play.INetHandlerPlayClient;
7
8
public class S31PacketWindowProperty implements Packet<INetHandlerPlayClient>
9
{
10
    private int windowId;
11
    private int varIndex;
12
    private int varValue;
13
14
    public S31PacketWindowProperty()
15
    {
16
    }
17
18
    public S31PacketWindowProperty(int windowIdIn, int varIndexIn, int varValueIn)
19
    {
20
        this.windowId = windowIdIn;
21
        this.varIndex = varIndexIn;
22
        this.varValue = varValueIn;
23
    }
24
25
    /**
26
     * Passes this Packet on to the NetHandler for processing.
27
     */
28
    public void processPacket(INetHandlerPlayClient handler)
29
    {
30
        handler.handleWindowProperty(this);
31
    }
32
33
    /**
34
     * Reads the raw packet data from the data stream.
35
     */
36
    public void readPacketData(PacketBuffer buf) throws IOException
37
    {
38
        this.windowId = buf.readUnsignedByte();
39
        this.varIndex = buf.readShort();
40
        this.varValue = buf.readShort();
41
    }
42
43
    /**
44
     * Writes the raw packet data to the data stream.
45
     */
46
    public void writePacketData(PacketBuffer buf) throws IOException
47
    {
48
        buf.writeByte(this.windowId);
49
        buf.writeShort(this.varIndex);
50
        buf.writeShort(this.varValue);
51
    }
52
53
    public int getWindowId()
54
    {
55
        return this.windowId;
56
    }
57
58
    public int getVarIndex()
59
    {
60
        return this.varIndex;
61
    }
62
63
    public int getVarValue()
64
    {
65
        return this.varValue;
66
    }
67
}

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

Deep Dive

Role in the protocol

S31PacketWindowProperty carries one container property update: unsigned byte windowId, short property id, short value. The meaning of the property id is container-type specific. The furnace uses 0 for burn time remaining, 1 for item cook progress, 2 for total cook time. The enchantment table uses 0-2 for the three level slots, the brewing stand 0 for brew time, the beacon 0 for power level. Tile entities push these through updateProgressBar whenever a field changes, typically once per tick while active.

Vanilla handling

NetHandlerPlayClient.handleWindowProperty resolves the container by window id and calls Container.updateProgressBar, which writes into the container's progress array. The GUI renderers (furnace flame, enchant glint, brewing bubbles) read that array every frame. Server side, EntityPlayerMP.sendProgressBarUpdate (lines 783 and 788 in the bundled sources) forwards a single property and sendAllWindowProperties pushes every field when the window opens. The values are absolute, not deltas.

Why clients touch it

None of the 8 clients has a module for this packet. The only non-vanilla hits are the Rise 6.x NetworkAPI script registration table (both 6.1.30 and 6.2.4) and the vanilla handler files. Auto-enchant and auto-brewer style modules, which would read S31 to time clicks, do not exist in these corpora. The 8 clients concentrate their inventory effort on stealing, armor handling and transaction sync, not on container progress.

Exploit surface

There is no exploit surface in this corpus. S31 is display-only state: the client renders the value and nothing else depends on it. A malicious server could flood S31 to churn the GUI renderer, but that is a server-side attack with no client counterpart, and no anti-cheat measures the packet because it carries no movement, combat or inventory-trust signal. Modules that needed progress data would have to parse the property stream themselves; none do.

Server-Side Handling

EntityPlayerMP.sendProgressBarUpdate constructs S31(windowId, var, value) and sends it whenever the open container's fields change; sendAllWindowProperties (line 788) pushes every field when the window opens. NetHandlerPlayClient.handleWindowProperty calls Container.updateProgressBar on the resolved container, which stores the value for the GUI to read. No validation, no rate limit, no client echo.

Protocol Analysis

Wire: unsigned byte windowId, short property, short value. Property semantics are fixed per container class, not negotiated: furnace 0-2, enchantment table 0-2, brewing stand 0, beacon 0. Values are absolute ticks or levels so the GUI can render progress without keeping history. PLAY state only, and only while the corresponding container is open; the server stops sending once the player closes the window.

Anti-Cheat Landscape

Nothing to flag: S31 is server-authoritative display data, sent at most a few times per second per open container, and no movement, combat or inventory-trust check reads it. The only conceivable abuse is a server spamming S31 to load the GUI render path, a denial-of-service vector aimed at the client rather than something a cheat client would do.

implementation Implementation Cases

The container progress packet: furnace flames, enchant levels, brewing bubbles. Zero module hits in the 8 clients; the only non-vanilla reference is the Rise 6.x script API registration table. This is render data with no cheat value in this corpus.

No module hooks exist in the corpus. The packet reaches containers exclusively through the vanilla handler.
Rise 6.1.30 and 6.2.4 register S31 in NetworkAPI so scripts can listen to it; that registration is the only non-vanilla reference in the corpus.

anticheat Anti-Cheat Checks

The corpus for this packet is empty: the mined index (data/ac-mined/S31PacketWindowProperty.txt) has no hits because the search terms were the MCP name S31PacketWindowProperty and the modern PacketPlayOutWindowProperty, while the 1.8 anticheats that know the packet call it WindowData. A direct grep of the anticheat root confirms the only references are registrations: Artemis maps SERVER_PLAY + 88 to PacketPlayServerWindowData and Negativity lists WINDOW_DATA in its PacketType enum. Neither runs a check on it. Container property updates are server-authoritative display data (furnace burn time, enchant levels, brewing progress) with no client-trust signal, so nothing flags them.

Wiki Cross-Reference

The furnace uses four properties, not three: 0 is fuel left counting down, 1 is maximum fuel burn time, 2 is cook progress counting up, and 3 is maximum progress (always 200 on vanilla).

The enchantment table uses property 3 for the enchantment seed that drives the rune names shown clientside, and the beacon uses properties 1 and 2 for its first and second potion effect IDs (-1 means no effect).

The anvil uses property 0 for the repair cost in XP levels, and brewing-stand property 0 is a 0-400 countdown where 400 renders an empty arrow and 0 a full one.

MCP 1.8.9 S31PacketWindowProperty implements Packet dispatching to INetHandlerPlayClient.handleWindowProperty; wire serde is readPacketData/writePacketData via readShort, readUnsignedByte.

1.8.9 callers: EntityPlayerMP.sendProgressBarUpdate sends new S31PacketWindowProperty (line 886): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/player/EntityPlayerMP.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.