0x28 S28PacketEffect

Plays a sound effect or particle effect at a position (without a named sound).

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

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

worldeffectparticle
Comprehensive 7/8

Fields

FieldTypeDescription
effectTypeintEffect ID (1023=portal, 2004=smithingTable, etc.)
posBlockPosEffect position
dataintEffect-specific data
disableRelativeVolumebooleanIf true, plays at full volume regardless of position

Wire Encoding

FieldTypeNotes
Effect IDint
PositionBlockPos (long)
Dataint
Disable VolumeboolSupress volume reduction

MCP References

MCPNetHandlerPlayClient.handleEffect()

Handler Interface

HNDINetHandlerPlayClient

Notes

Effect IDs: 1000-1023 (sound events), 1500-2004 (particle events). Unlike S29 (named sound via resource location), S28 uses numeric IDs.

Vanilla Source

S28PacketEffect.java81 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
import net.minecraft.util.BlockPos;
8
9
public class S28PacketEffect implements Packet<INetHandlerPlayClient>
10
{
11
    private int soundType;
12
    private BlockPos soundPos;
13
14
    /** can be a block/item id or other depending on the soundtype */
15
    private int soundData;
16
17
    /** If true the sound is played across the server */
18
    private boolean serverWide;
19
20
    public S28PacketEffect()
21
    {
22
    }
23
24
    public S28PacketEffect(int soundTypeIn, BlockPos soundPosIn, int soundDataIn, boolean serverWideIn)
25
    {
26
        this.soundType = soundTypeIn;
27
        this.soundPos = soundPosIn;
28
        this.soundData = soundDataIn;
29
        this.serverWide = serverWideIn;
30
    }
31
32
    /**
33
     * Reads the raw packet data from the data stream.
34
     */
35
    public void readPacketData(PacketBuffer buf) throws IOException
36
    {
37
        this.soundType = buf.readInt();
38
        this.soundPos = buf.readBlockPos();
39
        this.soundData = buf.readInt();
40
        this.serverWide = buf.readBoolean();
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.writeInt(this.soundType);
49
        buf.writeBlockPos(this.soundPos);
50
        buf.writeInt(this.soundData);
51
        buf.writeBoolean(this.serverWide);
52
    }
53
54
    /**
55
     * Passes this Packet on to the NetHandler for processing.
56
     */
57
    public void processPacket(INetHandlerPlayClient handler)
58
    {
59
        handler.handleEffect(this);
60
    }
61
62
    public boolean isSoundServerwide()
63
    {
64
        return this.serverWide;
65
    }
66
67
    public int getSoundType()
68
    {
69
        return this.soundType;
70
    }
71
72
    public int getSoundData()
73
    {
74
        return this.soundData;
75
    }
76
77
    public BlockPos getSoundPos()
78
    {
79
        return this.soundPos;
80
    }
81
}

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

Deep Dive

Role in the protocol

S28 is the numeric sound/particle effect packet: an int effect type, a BlockPos, an int data value, and a boolean that forces server-wide volume. Effect IDs are split into ranges: 1000-1023 for sound events (anvil, click, door) and 1500-2004 for particle/block events (smoke, portal, beacon, chest open particle). WorldManager sends it either to players near the position (64-block radius, volume-attenuated) or to every player when the server-wide flag is set (corpus lines 82/86).

Vanilla handling

NetHandlerPlayClient.handleEffect branches on the server-wide flag: isSoundServerwide routes to world.func_175669_a (global sound), otherwise world.playAuxSFX(type, pos, data), which maps the numeric ID to a sound or particle burst and plays it with position-based volume. The data int is effect-specific (block ID for break particles, pitch for sounds). There is no client feedback path; the packet is fire-and-forget.

Why clients touch it

Zero module hits in the 8-client corpus; the only non-vanilla reference is Rise 6.x's script NetworkAPI registration. The packet metadata mentions ESP tracking record players and particles, but no module in these 8 clients implements it. The reason is redundancy: effect sounds and particles are transient and position-derived, and anything a module could learn (a chest opening nearby, a beacon activating) is already visible through block state or S24.

Exploit surface

The exploitable direction is server to client: a malicious server can spam S28 with high-volume sound IDs or particle-heavy IDs to annoy or degrade the client (the classic record-spam or smoke-spam lag nuisance). The client applies each effect without rate limiting, which is why crash-patch modules bound effect rates. No corpus module does this for S28; Tenacity's AntiExploit covers the particle flood via S2APacketParticles instead, which is the named-particle equivalent.

Server-Side Handling

WorldManager.func_180439_a sends S28 to players within 64 blocks with serverWide=false; func_180440_b sends it to all players with serverWide=true (used for dimension-wide events like beacon activation or the wither spawn). The server never validates the effect ID or data against a whitelist, so any int in range goes through. No rate limit in vanilla.

Protocol Analysis

Wire format: int effect type, BlockPos long, int data, boolean serverWide. The effect type is a raw int, unlike S29PacketSoundEffect which carries a resource location; this is the 'numeric' counterpart. The boolean is a plain byte on the wire (writeBoolean/readBoolean). The data int is interpreted per effect ID, so the same int means block ID for break particles and pitch for sounds.

Anti-Cheat Landscape

Not monitored. Effects carry no player state, and the only abuse is nuisance flooding, which anti-cheats handle by rate-limiting inbound effect packets rather than flagging players. Client-side crash patches treat S28 and S2A as the same threat class (audio/particle floods), but none of the 8 clients ships that guard for S28 specifically.

implementation Implementation Cases

The numeric sound/particle effect packet with a server-wide volume flag. Zero modules in the 8 clients consume it; the only non-vanilla reference is Rise 6.x's scripting API registration. Transient, position-derived and fire-and-forget, it carries nothing a module needs that block state does not already provide.

PacketReceiveEvent is available on all clients; no module registers for S28 in the corpus.
All 8 clients keep the vanilla handler. Rise 6.1.30/6.2.4 register S28 in the script NetworkAPI table only. Tenacity's AntiExploit limits the S2APacketParticles flood but not the numeric S28 path.

anticheat Anti-Cheat Checks

The numeric world-effect packet has zero real hits in the corpus. The ac-mined file for S28 is dominated by keyword noise: the grep term 'Effect' surfaced potion-effect code (PotionEffectType, hasPotionEffect, banEffect) across Frequency, Negativity, Grim, Hydro, FlopAC and others, but none of those files reference S28PacketEffect or PacketPlayOutWorldEvent. No anticheat processes the packet, which is consistent with its role: a fire-and-forget clientbound sound or particle trigger carrying no player claim.

Wiki Cross-Reference

The trailing boolean disables distance-based volume falloff so effects such as wither spawn, enderdragon death and end-portal opening play correctly, and record playback at one location overwrites any record already playing there.

MCP 1.8.9 S28PacketEffect implements Packet dispatching to INetHandlerPlayClient.handleEffect; wire serde is readPacketData/writePacketData via readBlockPos, readBoolean, readInt.

1.8.9 callers: WorldManager.playAuxSFX sends new S28PacketEffect (line 88): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/world/WorldManager.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.