0x2A S2APacketParticles

Spawns particle effects at a position with offset, speed, and count.

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

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

worldparticleeffect
Comprehensive 8/8

Fields

FieldTypeDescription
particleNameStringParticle type (iconcrack, blockcrack, mobSpell, etc.)
x/y/zfloatSource position
offsetX/Y/ZfloatRandom spread
speedfloatParticle velocity
countintNumber of particles

Wire Encoding

FieldTypeNotes
Particle NameString
Xfloat
Yfloat
Zfloat
Offset X/Y/ZfloatSpread
Speedfloat
Countint

MCP References

MCPNetHandlerPlayClient.handleParticles()

Handler Interface

HNDINetHandlerPlayClient

Notes

Particle names: barriar, blockcrack, blockdust, bubble, cloud, crit, damageindicator, depthSuspend, drippingLava, drippingWater, droplet, enchantmenttable, endRod, explode, fireworkSpark, flame, footstep, happyVillager, heart, hugeexplosion, iconcrack, instantSpell, largeSmoke, lava, magicCrit, mobAppearance, mobSpell, mobSpellAmbient, note, portal, reddust, slime, smokeSpelling, snowballpoof, snowshovel, spell, suspended, sweepAttack, take, totem, townaura, wake, witchMagic.

Vanilla Source

S2APacketParticles.java189 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.EnumParticleTypes;
8
9
public class S2APacketParticles implements Packet<INetHandlerPlayClient>
10
{
11
    private EnumParticleTypes particleType;
12
    private float xCoord;
13
    private float yCoord;
14
    private float zCoord;
15
    private float xOffset;
16
    private float yOffset;
17
    private float zOffset;
18
    private float particleSpeed;
19
    private int particleCount;
20
    private boolean longDistance;
21
22
    /**
23
     * These are the block/item ids and possibly metaData ids that are used to color or texture the particle.
24
     */
25
    private int[] particleArguments;
26
27
    public S2APacketParticles()
28
    {
29
    }
30
31
    public S2APacketParticles(EnumParticleTypes particleTypeIn, boolean longDistanceIn, float x, float y, float z, float xOffsetIn, float yOffset, float zOffset, float particleSpeedIn, int particleCountIn, int... particleArgumentsIn)
32
    {
33
        this.particleType = particleTypeIn;
34
        this.longDistance = longDistanceIn;
35
        this.xCoord = x;
36
        this.yCoord = y;
37
        this.zCoord = z;
38
        this.xOffset = xOffsetIn;
39
        this.yOffset = yOffset;
40
        this.zOffset = zOffset;
41
        this.particleSpeed = particleSpeedIn;
42
        this.particleCount = particleCountIn;
43
        this.particleArguments = particleArgumentsIn;
44
    }
45
46
    /**
47
     * Reads the raw packet data from the data stream.
48
     */
49
    public void readPacketData(PacketBuffer buf) throws IOException
50
    {
51
        this.particleType = EnumParticleTypes.getParticleFromId(buf.readInt());
52
53
        if (this.particleType == null)
54
        {
55
            this.particleType = EnumParticleTypes.BARRIER;
56
        }
57
58
        this.longDistance = buf.readBoolean();
59
        this.xCoord = buf.readFloat();
60
        this.yCoord = buf.readFloat();
61
        this.zCoord = buf.readFloat();
62
        this.xOffset = buf.readFloat();
63
        this.yOffset = buf.readFloat();
64
        this.zOffset = buf.readFloat();
65
        this.particleSpeed = buf.readFloat();
66
        this.particleCount = buf.readInt();
67
        int i = this.particleType.getArgumentCount();
68
        this.particleArguments = new int[i];
69
70
        for (int j = 0; j < i; ++j)
71
        {
72
            this.particleArguments[j] = buf.readVarIntFromBuffer();
73
        }
74
    }
75
76
    /**
77
     * Writes the raw packet data to the data stream.
78
     */
79
    public void writePacketData(PacketBuffer buf) throws IOException
80
    {
81
        buf.writeInt(this.particleType.getParticleID());
82
        buf.writeBoolean(this.longDistance);
83
        buf.writeFloat(this.xCoord);
84
        buf.writeFloat(this.yCoord);
85
        buf.writeFloat(this.zCoord);
86
        buf.writeFloat(this.xOffset);
87
        buf.writeFloat(this.yOffset);
88
        buf.writeFloat(this.zOffset);
89
        buf.writeFloat(this.particleSpeed);
90
        buf.writeInt(this.particleCount);
91
        int i = this.particleType.getArgumentCount();
92
93
        for (int j = 0; j < i; ++j)
94
        {
95
            buf.writeVarIntToBuffer(this.particleArguments[j]);
96
        }
97
    }
98
99
    public EnumParticleTypes getParticleType()
100
    {
101
        return this.particleType;
102
    }
103
104
    public boolean isLongDistance()
105
    {
106
        return this.longDistance;
107
    }
108
109
    /**
110
     * Gets the x coordinate to spawn the particle.
111
     */
112
    public double getXCoordinate()
113
    {
114
        return (double)this.xCoord;
115
    }
116
117
    /**
118
     * Gets the y coordinate to spawn the particle.
119
     */
120
    public double getYCoordinate()
121
    {
122
        return (double)this.yCoord;
123
    }
124
125
    /**
126
     * Gets the z coordinate to spawn the particle.
127
     */
128
    public double getZCoordinate()
129
    {
130
        return (double)this.zCoord;
131
    }
132
133
    /**
134
     * Gets the x coordinate offset for the particle. The particle may use the offset for particle spread.
135
     */
136
    public float getXOffset()
137
    {
138
        return this.xOffset;
139
    }
140
141
    /**
142
     * Gets the y coordinate offset for the particle. The particle may use the offset for particle spread.
143
     */
144
    public float getYOffset()
145
    {
146
        return this.yOffset;
147
    }
148
149
    /**
150
     * Gets the z coordinate offset for the particle. The particle may use the offset for particle spread.
151
     */
152
    public float getZOffset()
153
    {
154
        return this.zOffset;
155
    }
156
157
    /**
158
     * Gets the speed of the particle animation (used in client side rendering).
159
     */
160
    public float getParticleSpeed()
161
    {
162
        return this.particleSpeed;
163
    }
164
165
    /**
166
     * Gets the amount of particles to spawn
167
     */
168
    public int getParticleCount()
169
    {
170
        return this.particleCount;
171
    }
172
173
    /**
174
     * Gets the particle arguments. Some particles rely on block and/or item ids and sometimes metadata ids to color or
175
     * texture the particle.
176
     */
177
    public int[] getParticleArgs()
178
    {
179
        return this.particleArguments;
180
    }
181
182
    /**
183
     * Passes this Packet on to the NetHandler for processing.
184
     */
185
    public void processPacket(INetHandlerPlayClient handler)
186
    {
187
        handler.handleParticles(this);
188
    }
189
}

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

Deep Dive

Role in the protocol

Spawns a particle burst at a world position with random offset, speed, and count. The particle name is a String that the client maps to an EnumParticleTypes; a trailing varint array carries iconcrack/blockcrack item and block data. Server-side it is the workhorse of WorldServer.spawnParticle, which batches particles into a single packet and sends it with a long-distance flag when the emitter is far from the viewer. The client handler walks the count in a loop, so a large count is a direct CPU/GPU cost on the receiving machine.

Vanilla handling

NetHandlerPlayClient.handleParticles marshals to the main thread, then calls clientWorldController.spawnParticle. When count is 0 the offset floats are treated as a single particle's velocity; otherwise the offsets are random spread and count particles are spawned. A Throwable around the spawn call logs 'Could not spawn particle effect' instead of crashing. The server path (WorldServer.spawnParticle) constructs one S2A per batch and uses sendToAllNear with a 512-block radius when longDistance is set.

Why clients touch it

Five distinct uses in the 8 clients. (1) Memeware 7.3 Disabler cancels every S2A unconditionally, an anti-lag/anti-crash blanket filter. (2) Rise 5.99 Disabler cancels only SLIME-type particles in its HypixelSlime mode. (3) Rise 6.x ParticleDistanceComponent, a performance component, drops any particle further than 6 blocks from the player. (4) Rise 6.x ParticleCheck, a security feature, token-buckets particle counts and drops floods. (5) Tenacity 6.0 AntiExploit cancels particles with extreme speed or count, and Sigma 4.11 Criticals skips S2A inside its own packet state machine so the crit-trigger logic is not disturbed.

Exploit surface

Particle floods are a classic client-crash vector: a server sends one S2A with a huge count or repeated packets, and the client spawns thousands of entities per tick. Anti-cheat servers also use particle bursts as visual flags for cheaters (crit particles on KillAura, etc.). Client defenses range from blanket cancellation (Memeware) to rate limiting (Rise ParticleCheck: accumulate count, drain 6 per packet, cap 150, drop over 100) to heuristic drops (Tenacity: speed >= 1 or count > 1). The trade-off is visibility: aggressive cancellation hides legitimate gameplay effects.

Server-Side Handling

WorldServer.spawnParticle builds one S2APacketParticles per batch with particle type, longDistance flag, x/y/z floats, three offset floats, speed, count, and a varint data array. It sends via ConfigurationManager.sendToAllNear (radius 512 when longDistance, else 32). NetHandlerPlayClient.handleParticles then loops count times through clientWorldController.spawnParticle, which is where a flood becomes a client-side hang. No server-side cap exists on count in vanilla 1.8.9.

Protocol Analysis

Encoding: String particle name, boolean longDistance, float x, float y, float z, float offsetX, float offsetY, float offsetZ, float speed, int count, then a varint-length int array of particle arguments used only by iconcrack and blockcrack. The name is read with readStringFromBuffer(64). Count 0 is special: offsets become velocity for a single particle. The packet was introduced in 1.8 with the EnumParticleTypes refactor that replaced the older string-only effect packets.

Anti-Cheat Landscape

Anti-cheats use particles as a side channel rather than flagging the packet itself: critical-hit particles around a target are evidence for killaura checks on servers that render them. The client-side countermeasures here are defensive, not evasive. The interesting tension is Rise ParticleCheck's accumulator: it treats particle arrival as a budget (drain 6 per packet, cap 150, drop when the bucket exceeds 100), which keeps normal combat particles while killing flood attempts. Blanket cancels (Memeware) trade all particle feedback for stability.

implementation Implementation Cases

The particle broadcast packet, and the only one of the six where client defense depth actually shows: blanket cancel (Memeware), selective cancel (Rise 5.99 slime mode), distance culling (Rise 6.x performance component), flood rate limiting (Rise 6.x ParticleCheck), and crash heuristics (Tenacity AntiExploit). Sigma's Criticals skips it inside its packet state machine.

Disabler (particle cancel) (Memeware 7.3, Nekoware v1 private, Rise 5.99)

Remove particle traffic client-side: blanket in Memeware, selective slime-only in Rise 5.99.

Memeware's Disabler registers a PacketInEvent consumer that cancels every S2A it sees, unconditionally, regardless of mode. Rise 5.99's Disabler, in HypixelSlime mode, checks the particle type and cancels only EnumParticleTypes.SLIME. Nekoware's Disabler imports the class but ships no active particle handler in the file.

Source: Memeware 7.3, me/memewaredevs/client/module/exploit/Disabler.java

Vanilla hook: PacketInEvent (custom event bus).
Invisible server-side: cancelled clientbound packets are never acknowledged. The cost is losing all particle feedback, which some servers use as hit indicators.
Variations: Rise 5.99 restricts the cancel to SLIME particles in the HypixelSlime mode. Nekoware v1 private imports S2APacketParticles in its Disabler but has no handler using it (dead import).
ParticleDistanceComponent (performance) (Rise 6.2.4, Rise 6.1.30)

Drop particle packets whose origin is more than 6 blocks away to save GPU work.

A Component (non-module system) listening on PacketReceiveEvent. For each S2A it computes the squared distance from the player to the packet origin and cancels the packet when distanceSq >= 36, i.e. 6 blocks. Particles closer than 6 blocks pass through untouched.

Source: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/component/impl/performance/ParticleDistanceComponent.java

Vanilla hook: PacketReceiveEvent (EventLink listener).
No anti-cheat exposure; it is a pure client-performance filter. Aggressive distance culling can hide distant particle cues like explosions or beacon effects.
Variations: Identical file in Rise 6.1.30 under com/alan/clients/component/impl/performance/.
ParticleCheck (security) (Rise 6.2.4, Rise 6.1.30)

Rate-limit inbound particle volume so a malicious server cannot crash the client with a flood.

A SecurityFeature. For each S2A it adds the packet's particle count to an accumulator, drains 6 per packet, and clamps the bucket at 150. The packet is dropped when the bucket exceeds 100, or when count is < 1, |count| > 20, or speed is negative or above 1000. Normal combat particles pass because their per-packet counts are small.

Source: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/security/impl/ParticleCheck.java

Vanilla hook: Security pipeline handle(Packet) on the receive path.
Defends the client against particle-crash exploits. The drain rate and 100-threshold are tuned so that even heavy combat (crit, sweep, potion particles) never trips it.
Variations: Identical file in Rise 6.1.30. Tenacity 6.0 AntiExploit implements the same idea with simpler heuristics (see its own entry).
AntiExploit (particle flood) (Tenacity 6.0)

Cancel particle packets that look like crash attempts while logging the block.

A PacketReceiveEvent handler. For S2A it cancels and prints 'Blocked Exploit: Particles' when |particleSpeed| >= 1, or 'Blocked Exploit: Crash' when particleCount > 1. The module bundles several crash-vector filters (resource pack URLs, camera spectate, explosion strength) with a shared 100-packet-per-second counter.

Source: Tenacity 6.0, dev/tenacity/module/impl/misc/AntiExploit.java

Vanilla hook: PacketReceiveEvent (IEventListener).
The heuristic is aggressive enough that servers emitting unusual particle effects (custom enchant glints, heavy weather) get filtered. ChatUtil.print spam on each block is a minor DoS surface by itself.
Variations: Rise 6.x uses the token-bucket ParticleCheck instead; Tenacity's version trades precision for simplicity.
Criticals (packet skip) (Sigma 4.11)

Keep S2A out of the critical-hit packet state machine so it cannot reset the spoofed-position sequence.

In the EventPacket branch of Criticals, an early return fires when the packet is S2A, so particle broadcasts never reach the transaction/position logic below. The handler's state machine tracks C0F transactions and C03 position packets to trigger criticals; particle noise would otherwise be type-checked pointlessly.

Source: Sigma 4.11, info/sigmaclient/module/impl/combat/Criticals.java

Vanilla hook: EventPacket (Sigma event bus, pre/post).
Skipping particles has no anti-cheat effect; it is a micro-optimization and a guard against future code paths that might misinterpret clientbound noise.
Variations: No other client in the corpus touches S2A from a combat module.
Every handler sits on the packet receive path: Memeware PacketInEvent, Tenacity and Rise 6.x PacketReceiveEvent, Sigma EventPacket, Rise security chain handle(Packet).
Memeware cancels via event.cancel() on a custom bus. Rise 6.x components and security features use event.setCancelled() or pipeline drop. Sigma returns early inside a single handler. Tenacity combines cancel with a per-second packet counter shared across crash vectors.

anticheat Anti-Cheat Checks

The particle packet is the one clientbound cosmetic packet that anticheats actively generate. Kauri, FlopAC, Artemis, Daedalus and intave all construct and send S2A (or its PacketEvents equivalent) to draw debug overlays: hitbox cuboids, rays and collision boxes during testing and at flag time. Artemis additionally ships a full read/write wrapper so the packet can be parsed and re-emitted by its pipeline. No anticheat flags S2A as a cheat signal; the corpus treats it as an output channel, not an input.

Debug particle visualization (Kauri / FlopAC / Daedalus / intave) (funkemunky-KauriV3, JTXOfficial-FlopAC, funkemunky-Daedalus, intave-intave)

Render hitboxes, rays and collision boxes to the player's screen by sending particle packets, so staff and developers can see exactly what a check computed.

Kauri's Helper.drawRay and drawCuboid build a WrapperPlayServerParticle (the PacketEvents S2A equivalent) with the ray or box edge positions and send it to the player. FlopAC's MiscUtils does the same through its own WrappedPacketPlayOutWorldParticle wrapper, and its collision box types each implement a draw() that emits particles along their edges. Daedalus submits particle drawing for bounding boxes to a thread pool, and intave spawns villager-happy particles at waypoints via Bukkit spawnParticle, rate-limited per position. The packets are fired on flag, in debug mode, or from dedicated reveal handlers.

Detects: Nothing on its own. The visualization is an operator aid layered on top of reach, hitbox and phase checks; it exposes the geometry those checks reason about.

Source: funkemunky-KauriV3, Anticheat/src/main/java/dev/brighten/ac/utils/Helper.java

Variations: FlopAC MiscUtils.drawRay/drawCuboid mirror Kauri's Helper with its own tinyprotocol wrapper. Daedalus CollisionAssessment sends flame particles for bounding boxes. intave Particles.spawnVillagerHappyParticleAt rate-limits waypoint particles. Artemis BoundingUtil.drawBox uses its GPacketPlayServerWorldParticles wrapper for the same purpose.
World particles wrapper (Artemis) (artemisac-artemis-minecraft-anticheat)

Give Artemis a full read/write wrapper for the world-particles packet so the pipeline can parse inbound S2A and re-emit particle packets for debug drawing.

GPacketPlayServerWorldParticles implements ReadableBuffer and WriteableBuffer. read() parses the particle type (with a BARRIER fallback on a bad id), the long-distance flag, position, offsets, speed, count and the per-type argument array; write() serializes them back, negating particle arguments on the wire. BoundingUtil.drawBox builds one of these packets per box edge to render debug bounding boxes, and the ProtocolGeneratorDirect registers the class in the generated protocol.

Detects: Nothing. The wrapper is bidirectional plumbing: inbound parsing feeds the packet pipeline, outbound construction powers the debug-box renderer.

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

Variations: Artemis also maps SERVER_PLAY + 93 to PacketPlayServerWorldParticles in its repository. FlopAC's WrappedPacketPlayOutWorldParticle covers the same packet for its 1.8 base, and Kauri uses PacketEvents' WrapperPlayServerParticle directly.

Wiki Cross-Reference

The long-distance flag extends particle visibility from 256 blocks to 65536 blocks, and the offset fields are spread with gaussian random values around the source position.

MCP 1.8.9 S2APacketParticles implements Packet dispatching to INetHandlerPlayClient.handleParticles; wire serde is readPacketData/writePacketData via readBoolean, readFloat, readInt, readVarIntFromBuffer.

1.8.9 callers: WorldServer.spawnParticle sends new S2APacketParticles (line 1149): 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.

Module Analyses Using S2APacketParticles

Full source walkthroughs of the modules and anti-cheats that use this packet.