0x24 S24PacketBlockAction

Triggers a block action animation/event (chest open, piston extend, note block play, etc.).

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

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

worldblockanimation
Comprehensive 7/8

Fields

FieldTypeDescription
posBlockPosBlock position
actionData1byteAction type ID
actionData2byteAction parameter
blockTypeBlockBlock type ID

Wire Encoding

FieldTypeNotes
Block PositionBlockPos (long)
Byte 1byteAction type
Byte 2byteAction param
Block TypeVarIntBlock ID

MCP References

MCPNetHandlerPlayClient.handleBlockAction()

Handler Interface

HNDINetHandlerPlayClient

Notes

Block actions: chest open/close, piston extend/retract, note block note, door open, dispenser click, etc.

Vanilla Source

S24PacketBlockAction.java84 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.block.Block;
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
10
public class S24PacketBlockAction implements Packet<INetHandlerPlayClient>
11
{
12
    private BlockPos blockPosition;
13
    private int instrument;
14
    private int pitch;
15
    private Block block;
16
17
    public S24PacketBlockAction()
18
    {
19
    }
20
21
    public S24PacketBlockAction(BlockPos blockPositionIn, Block blockIn, int instrumentIn, int pitchIn)
22
    {
23
        this.blockPosition = blockPositionIn;
24
        this.instrument = instrumentIn;
25
        this.pitch = pitchIn;
26
        this.block = blockIn;
27
    }
28
29
    /**
30
     * Reads the raw packet data from the data stream.
31
     */
32
    public void readPacketData(PacketBuffer buf) throws IOException
33
    {
34
        this.blockPosition = buf.readBlockPos();
35
        this.instrument = buf.readUnsignedByte();
36
        this.pitch = buf.readUnsignedByte();
37
        this.block = Block.getBlockById(buf.readVarIntFromBuffer() & 4095);
38
    }
39
40
    /**
41
     * Writes the raw packet data to the data stream.
42
     */
43
    public void writePacketData(PacketBuffer buf) throws IOException
44
    {
45
        buf.writeBlockPos(this.blockPosition);
46
        buf.writeByte(this.instrument);
47
        buf.writeByte(this.pitch);
48
        buf.writeVarIntToBuffer(Block.getIdFromBlock(this.block) & 4095);
49
    }
50
51
    /**
52
     * Passes this Packet on to the NetHandler for processing.
53
     */
54
    public void processPacket(INetHandlerPlayClient handler)
55
    {
56
        handler.handleBlockAction(this);
57
    }
58
59
    public BlockPos getBlockPosition()
60
    {
61
        return this.blockPosition;
62
    }
63
64
    /**
65
     * instrument data for noteblocks
66
     */
67
    public int getData1()
68
    {
69
        return this.instrument;
70
    }
71
72
    /**
73
     * pitch data for noteblocks
74
     */
75
    public int getData2()
76
    {
77
        return this.pitch;
78
    }
79
80
    public Block getBlockType()
81
    {
82
        return this.block;
83
    }
84
}

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

Deep Dive

Role in the protocol

S24 is a block-level event trigger: chest open/close, piston extend/retract, note block note, dispenser click, door open, beacon power. It carries a BlockPos, two action bytes (event ID and parameter) and the block type. The server broadcasts it from WorldServer's block-event queue (line 934 in the 1.8.9 corpus) to every player within 64 blocks of the position via sendToAllNear, which means it is a proximity event, not a per-player one.

Vanilla handling

NetHandlerPlayClient.handleBlockAction calls PacketThreadUtil.func_180031_a then world.addBlockEvent(pos, blockType, data1, data2), which fans out to every IWorldAccess (render global, sound handler). The action bytes are interpreted per block: BlockChest uses data1 for open state, BlockNote uses data1 as the pitch index, BlockPiston uses data1 as the direction and data2 as extend/retract. The block type field is a cross-check; the client only plays the event if the local block matches.

Why clients touch it

Zero module hits in the 8-client corpus. The only non-vanilla reference is Rise 6.x's script API (NetworkAPI.java), which registers the packet class so Lua scripts can listen, not a shipped module. The reason is structural: S24 describes transient animations, and every piece of information it carries (chest open state, piston position) is already derivable from the block state or from S23 block changes, so ESP and chest modules read the world instead of the packet stream.

Exploit surface

S24 is entirely cosmetic and server-trusted, so there is no meaningful exploit surface. The 64-block broadcast radius is the only measurable property, and it is too coarse for tracking. A malicious server could spam S24 with garbage data bytes, but the vanilla handler bounds the damage to a single addBlockEvent call per packet, and the local-block cross-check drops mismatches, so there is no crash or desync primitive.

Server-Side Handling

WorldServer keeps a BlockEventData queue; each tick it drains entries and sends S24 via mcServer.getConfigurationManager().sendToAllNear(x, y, z, 64.0D, dimensionId, packet). The 64.0 range is hardcoded in the server handler, matching the client's sound-render distance for block events. No rate limiting, no validation of the action bytes.

Protocol Analysis

Wire format: BlockPos long, byte action ID, byte action parameter, VarInt block registry ID. The block type is read as a full Block object server-side via Block.getBlockById. The two bytes are raw event semantics decided by the block class, so the same byte values mean different things for a chest vs a piston.

Anti-Cheat Landscape

Not monitored. Block-action packets carry no player motion, timing or position claims, so anti-cheats ignore them entirely. The only conceivable use is a server-side sanity check that a piston event is accompanied by an actual piston block change, which no major anti-cheat implements for 1.8.9.

implementation Implementation Cases

A cosmetic block-event trigger (chests, pistons, note blocks) broadcast within 64 blocks. No module in the 8 clients consumes it; the only non-vanilla reference is Rise 6.x's scripting API registration. Every fact it carries is derivable from block state, which is why clients ignore it.

PacketReceiveEvent exists on all clients but no module registers for S24 in the corpus.
All 8 clients keep the vanilla handler. Rise 6.1.30 and 6.2.4 additionally expose S24 in their script NetworkAPI, which is a class-registration table, not module code.

anticheat Anti-Cheat Checks

The block-action packet (chest open, piston, note block) has a single corpus hit: Artemis registers a GPacketPlayServerBlockAction wrapper in its packet library so the abstraction layer can route the clientbound packet. The wrapper is a read-stub: its read() body is empty, and no Artemis check consumes the packet. No anticheat flags S24 or derives state from it, because it carries transient animation data with no movement, timing or position claim.

Packet wrapper registration (Artemis) (artemisac-artemis-minecraft-anticheat)

Register the block-action packet in Artemis's packet abstraction so clientbound traffic of this type is recognized by the pipeline.

GPacketPlayServerBlockAction extends GPacket and is linked to the PacketPlayServerBlockAction interface via @PacketLink. The read() method is empty, so the wrapper decodes no fields; it exists purely so the packet has a typed class in the cc.ghast.packet wrapper tree. No check in the corpus reads its payload.

Detects: Nothing. The entry documents the only anticheat touch point for S24: packet-library plumbing, not detection logic.

Source: artemisac-artemis-minecraft-anticheat, ac.artemis.packet.spigot/src/main/java/cc/ghast/packet/wrapper/packet/play/server/GPacketPlayServerBlockAction.java

Variations: No other anticheat in the corpus references S24PacketBlockAction or PacketPlayOutBlockAction.

Wiki Cross-Reference

Clientbound 0x24: BlockPos plus byte action ID, byte parameter and VarInt block type.

Same bytes mean different things per block: chest lid, piston direction, note pitch.

Broadcast to players within 64 blocks; client ignores it if local block type mismatches.

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

1.8.9 callers: WorldServer.sendQueuedBlockEvents sends new S24PacketBlockAction (line 1052): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/world/WorldServer.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.