0x27 S27PacketExplosion

Server notifies the client of an explosion (TNT, creeper, bed in Nether/End, etc).

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

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

worldexplosiontntcombatentity
Comprehensive 8/8

Fields

FieldTypeDescription
x/y/zfloatExplosion center
strengthfloatExplosion power/strength
affectedBlockPositionsList<BlockPos>Blocks destroyed by the explosion
motionX/Y/ZfloatPlayer knockback velocity from the explosion

Wire Encoding

FieldTypeNotes
Xfloat
Yfloat
Zfloat
Radiusfloat
Record Countint
Recordsbyte arrayRelative positions of affected blocks
Player Motion Xfloat
Player Motion Yfloat
Player Motion Zfloat

MCP References

MCPNetHandlerPlayClient.handleExplosion()

Handler Interface

HNDINetHandlerPlayClient

Notes

Affected blocks are sent as byte triplets (x, y, z) relative to the explosion center. The client applies particle effects and knockback to the local player.

Vanilla Source

S27PacketExplosion.java147 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import com.google.common.collect.Lists;
4
import java.io.IOException;
5
import java.util.List;
6
import net.minecraft.network.Packet;
7
import net.minecraft.network.PacketBuffer;
8
import net.minecraft.network.play.INetHandlerPlayClient;
9
import net.minecraft.util.BlockPos;
10
import net.minecraft.util.Vec3;
11
12
public class S27PacketExplosion implements Packet<INetHandlerPlayClient>
13
{
14
    private double posX;
15
    private double posY;
16
    private double posZ;
17
    private float strength;
18
    private List<BlockPos> affectedBlockPositions;
19
    private float field_149152_f;
20
    private float field_149153_g;
21
    private float field_149159_h;
22
23
    public S27PacketExplosion()
24
    {
25
    }
26
27
    public S27PacketExplosion(double p_i45193_1_, double y, double z, float strengthIn, List<BlockPos> affectedBlocksIn, Vec3 p_i45193_9_)
28
    {
29
        this.posX = p_i45193_1_;
30
        this.posY = y;
31
        this.posZ = z;
32
        this.strength = strengthIn;
33
        this.affectedBlockPositions = Lists.newArrayList(affectedBlocksIn);
34
35
        if (p_i45193_9_ != null)
36
        {
37
            this.field_149152_f = (float)p_i45193_9_.xCoord;
38
            this.field_149153_g = (float)p_i45193_9_.yCoord;
39
            this.field_149159_h = (float)p_i45193_9_.zCoord;
40
        }
41
    }
42
43
    /**
44
     * Reads the raw packet data from the data stream.
45
     */
46
    public void readPacketData(PacketBuffer buf) throws IOException
47
    {
48
        this.posX = (double)buf.readFloat();
49
        this.posY = (double)buf.readFloat();
50
        this.posZ = (double)buf.readFloat();
51
        this.strength = buf.readFloat();
52
        int i = buf.readInt();
53
        this.affectedBlockPositions = Lists.<BlockPos>newArrayListWithCapacity(i);
54
        int j = (int)this.posX;
55
        int k = (int)this.posY;
56
        int l = (int)this.posZ;
57
58
        for (int i1 = 0; i1 < i; ++i1)
59
        {
60
            int j1 = buf.readByte() + j;
61
            int k1 = buf.readByte() + k;
62
            int l1 = buf.readByte() + l;
63
            this.affectedBlockPositions.add(new BlockPos(j1, k1, l1));
64
        }
65
66
        this.field_149152_f = buf.readFloat();
67
        this.field_149153_g = buf.readFloat();
68
        this.field_149159_h = buf.readFloat();
69
    }
70
71
    /**
72
     * Writes the raw packet data to the data stream.
73
     */
74
    public void writePacketData(PacketBuffer buf) throws IOException
75
    {
76
        buf.writeFloat((float)this.posX);
77
        buf.writeFloat((float)this.posY);
78
        buf.writeFloat((float)this.posZ);
79
        buf.writeFloat(this.strength);
80
        buf.writeInt(this.affectedBlockPositions.size());
81
        int i = (int)this.posX;
82
        int j = (int)this.posY;
83
        int k = (int)this.posZ;
84
85
        for (BlockPos blockpos : this.affectedBlockPositions)
86
        {
87
            int l = blockpos.getX() - i;
88
            int i1 = blockpos.getY() - j;
89
            int j1 = blockpos.getZ() - k;
90
            buf.writeByte(l);
91
            buf.writeByte(i1);
92
            buf.writeByte(j1);
93
        }
94
95
        buf.writeFloat(this.field_149152_f);
96
        buf.writeFloat(this.field_149153_g);
97
        buf.writeFloat(this.field_149159_h);
98
    }
99
100
    /**
101
     * Passes this Packet on to the NetHandler for processing.
102
     */
103
    public void processPacket(INetHandlerPlayClient handler)
104
    {
105
        handler.handleExplosion(this);
106
    }
107
108
    public float func_149149_c()
109
    {
110
        return this.field_149152_f;
111
    }
112
113
    public float func_149144_d()
114
    {
115
        return this.field_149153_g;
116
    }
117
118
    public float func_149147_e()
119
    {
120
        return this.field_149159_h;
121
    }
122
123
    public double getX()
124
    {
125
        return this.posX;
126
    }
127
128
    public double getY()
129
    {
130
        return this.posY;
131
    }
132
133
    public double getZ()
134
    {
135
        return this.posZ;
136
    }
137
138
    public float getStrength()
139
    {
140
        return this.strength;
141
    }
142
143
    public List<BlockPos> getAffectedBlockPositions()
144
    {
145
        return this.affectedBlockPositions;
146
    }
147
}

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

Deep Dive

Role in the protocol

S27 is the server's explosion broadcast: center x/y/z floats, strength, a list of affected block positions encoded as byte triplets relative to the center, and a per-player knockback vector as three floats. WorldServer sends one S27 per affected player (corpus line 901), with the knockback floats computed per player from the explosion's player knockback map. The client both renders the destroyed blocks and applies the knockback vector to the local player, which is why it is the second half of every velocity module's packet filter alongside S12PacketEntityVelocity.

Vanilla handling

NetHandlerPlayClient.handleExplosion builds an Explosion object from the center and strength, calls doExplosionB(true) to spawn particles and sounds, then adds the packet's motion floats straight into thePlayer.motionX/Y/Z. Critically, the knockback is applied unconditionally on the main thread; there is no entity-ID check because the packet is per-player. That makes S27 the standard fallback for anti-cheat velocity implementations: servers that hide S12 knockback in explosion packets still deliver S27, so clients must filter both.

Why clients touch it

S27 is the most-touched clientbound packet in this batch. Every velocity module in the corpus filters it: Memeware and Nekoware cancel it in a shared combat/Velocity pattern, Rise 5.99's Velocity scales or cancels it, Sigma's AntiVelocity handles it in basic mode, Spicy's AntiKnockback cancels it, and Tenacity's VelocityModule scales it by the same horizontal/vertical settings as S12. Rise 6.x splits this into a suite of per-server modes (Standard, Vulcan, Redesky, UniversoCraft, BufferAbuse), all of which touch S27. Movement modules also consume it: Rise 5.99's Fly (Minemenclub) and LongJump (Hycraft, Vulcan) cancel S27 to control knockback timing, and Sigma's Fly uses it for explosion-based boosting. LiquidSense Dev's PingSpoof imports S27PacketExplosion but never references it in the module body; the import is dead scaffolding from the upstream LiquidBounce PingSpoof.

Exploit surface

The exploit surface is bidirectional. Client-side, scaling or cancelling the knockback floats is invisible to the server because S27 is one-way; anti-cheats can only infer from resulting motion, which is why velocity modules keep the S12 and S27 paths symmetric. Server-side, a hostile server can send S27 with huge motion floats (Rise's ExplosionCheck guards against motion >= Byte.MAX_VALUE) or enormous affected-block lists to stall the client's block-position loop, which is exactly the flood Tenacity's AntiExploit rate-limits. Rise's ItemDamageComponent also counts S27 as a damage source to resync the player's health model.

Server-Side Handling

WorldServer.createExplosion computes the affected block list and a per-player knockback Vec3 from the blast, then sends a dedicated S27 to each EntityPlayerMP (corpus line 901). The knockback map is filled only for players the explosion actually hits, so players outside the blast receive an S27 with zero motion floats but still get the visual. No client acknowledgement and no rate limiting in vanilla.

Protocol Analysis

Wire format: three floats (center), float strength, int record count, then count byte triplets as offsets from the center (each block position is center + signed byte), then three floats of player motion. The triplet encoding caps the block list extent at 127 blocks from the center, which is why ExplosionCheck thresholds at Byte.MAX_VALUE. PLAY state only.

Anti-Cheat Landscape

Anti-cheats cannot see the mutation, so they infer velocity removal from motion deltas: after a flagged hit they compare the player's acceleration against the expected knockback curve. That is why legit-looking modes exist: Tenacity's horizontal/vertical percentages, Rise 6.x's per-server modes, and movement modules that cancel S27 only while airborne. The Rise 6.x BufferAbuse and PingSpoofComponent keep the S27 path consistent with transaction buffering, since a desynced knockback stream is a strong velocity flag on Vulcan and Watchdog.

implementation Implementation Cases

The explosion broadcast that carries both destroyed-block positions and a per-player knockback vector. Every velocity module in the corpus filters it alongside S12PacketEntityVelocity; Rise 6.x dedicates five per-server modes to it, movement modules cancel it to shape knockback, and Tenacity's AntiExploit rate-limits it against crash floods. The packet is one-way, so all client abuse is invisible to the server.

Velocity / AntiKnockback (Memeware 7.3, Nekoware v1 private, Rise 5.99, Sigma 4.11, Spicy, Tenacity 6.0)

Cancel or scale explosion knockback so hits from TNT, creepers and beds apply reduced or zero motion.

PacketReceiveEvent filter: if the packet is S27PacketExplosion, either cancel it outright or multiply motionX/Y/Z by horizontal/vertical percentage settings before the vanilla handler applies them. Tenacity scales in place; Memeware/Nekoware/Spicy cancel; Rise 5.99 and Sigma switch behavior per configured mode.

Source: Tenacity 6.0, dev/tenacity/module/impl/movement/VelocityModule.java

Vanilla hook: PacketReceiveEvent.
In-place scaling is safer than cancel: the server still sees a packet pass and the client motion delta stays consistent with a legitimately weaker explosion. Full cancel flags on anti-cheats that measure knockback absence, which is why modes like Rise's Minemenclub variants only zero S27 while airborne.
Variations: Memeware and Nekoware cancel S27 in combat/Velocity. Rise 5.99 scales per mode (Cancel/Push/etc.). Sigma AntiVelocity handles S27 in basic mode only. Spicy AntiKnockback cancels it. All six clients pair the S27 filter with the S12PacketEntityVelocity filter in the same handler.
StandardVelocity / VulcanVelocity / RedeskyVelocity / UniversoCraftVelocity / BufferAbuseVelocity (Rise 6.2.4, Rise 6.1.30)

Per-server velocity modes that each define their own S27 (and S12) handling, from full cancel to percentage scaling to transaction-buffered removal.

Each mode is a Rise Mode subclass with an @EventLink PacketReceiveEvent listener. StandardVelocity scales or cancels S27 based on horizontal/vertical sliders and an Explosion Ignore boolean. VulcanVelocity, RedeskyVelocity and UniversoCraftVelocity cancel or mutate S27 to match each server's knockback checks. BufferAbuseVelocity folds S27 into the client's transaction-buffer manipulation so the knockback stream stays consistent while transactions are delayed.

Source: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/combat/velocity/StandardVelocity.java

Vanilla hook: PacketReceiveEvent, PreMotionEvent, TeleportEvent.
The per-server split exists because each anti-cheat (Vulcan, Redesky, UniversoCraft, etc.) measures knockback differently. Percentage modes are low-risk; full-cancel modes only run when the server's velocity check is known to be weak, and BufferAbuse keeps S27 consistent with the buffered transaction stream so the two cannot be cross-correlated.
Variations: The same five modes exist in Rise 6.1.30 and 6.2.4 with near-identical bodies; 6.2.4 adds WatchdogPredictionVelocity and Grim-family modes that do not reference S27. PingSpoofComponent in both versions lists S27PacketExplosion in the velocity packet class set it buffers, and ItemDamageComponent counts S27 as a damage input.
Fly / LongJump (Rise 5.99, Sigma 4.11)

Cancel explosion knockback inside movement exploits so a mid-air boost or long jump is not interrupted by server-applied velocity.

Rise 5.99's LongJump cancels S27 (and S12) in onPacketReceive when the Hycraft or Vulcan mode is active; its Fly cancels S27 in the Minemenclub mode. Sigma's Fly treats S27 as a velocity source for explosion-boost movement. The cancel keeps the server's knockback from perturbing the carefully staged motion values the module computes each tick.

Source: Rise 5.99, dev/rise/module/impl/movement/LongJump.java

Vanilla hook: PacketReceiveEvent (onPacketReceive).
Cancelling S27 mid-jump is one of the oldest velocity tells because the motion discontinuity is measurable. These modes rely on the server's knockback check being absent or on the jump's speed exceeding what the anti-cheat expects, which is why they are mode-gated to specific servers.
Variations: Rise 5.99 Fly handles S27 in Minemenclub mode; Sigma Fly uses S27 as an explosion boost input in its packet handler; Sigma's InfiniteAura imports S27 (the corpus shows the import only, unused in the visible body).
AntiExploit (Tenacity 6.0)

Block crash-exploit S27 floods from malicious servers by bounding explosion strength and arrival rate.

PacketReceiveEvent handler: cancels S27 when abs(strength) > 1 or when two explosions arrive within 1 ms, printing a blocked-exploit chat message. The same handler covers resource-pack, camera, particle and teleport crash vectors with the same pattern, and a separate packet-count throttle kicks the client-side watchdog when inbound packet rate exceeds 100/sec.

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

Vanilla hook: PacketReceiveEvent.
Not a cheat at all, it is client-side self-defense against lag machines. Nothing flags it because it only cancels inbound packets. Its strength heuristic is coarser than Rise's ExplosionCheck, which thresholds the motion floats at Byte.MAX_VALUE instead of the strength float.
Variations: Rise 6.1.30/6.2.4 ship the equivalent as a security feature, ExplosionCheck.java, which cancels S27 when any motion float exceeds Byte.MAX_VALUE (mirroring the wire format's signed-byte block offsets).
Debugger (Rise 6.2.4, Rise 6.1.30)

Print explosion velocity values to chat as part of a packet-level debug overlay for development and bypass work.

PacketReceiveEvent handler: when the Velocity toggle is on and the packet is S27PacketExplosion, prints DeltaX/DeltaY/DeltaZ from func_149149_c / func_149144_d / func_149147_e, the same motion floats velocity modules mutate. The debug output shows the exact knockback vector a server sends, letting a developer tune a velocity mode's scaling against real traffic.

Source: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/other/Debugger.java

Vanilla hook: PacketReceiveEvent, PacketSendEvent, Render2DEvent, PreMotionEvent.
Read-only; prints to chat only. It exists to make the velocity suite's tuning data visible, and it is the only module in the corpus that reads S27 without mutating or cancelling it.
Variations: Identical in Rise 6.1.30 and 6.2.4. Rise 5.99 has a PacketDebugger module for the same role, but the corpus shows no S27 reference in it.
PingSpoof (unused import) (LiquidSense Dev)

Documented for completeness: LiquidSense Dev's PingSpoof imports S27PacketExplosion but does not process the packet in this build.

The module buffers C0FPacketConfirmTransaction and C00PacketKeepAlive on the send side and flushes them after a random delay on the update loop. S27PacketExplosion appears only in the import list (line 23) and is never referenced in the module body, so no explosion handling exists.

Source: LiquidSense Dev, net/ccbluex/liquidbounce/features/module/modules/exploit/PingSpoof.java

Vanilla hook: PacketEvent (onPacket) for C0F/C00 buffering; no S27 hook.
No detection relevance: an unused import changes nothing on the wire.
Variations: No other corpus client carries a dead S27 import in a ping-spoof module; Rise 6.x PingSpoofComponent genuinely buffers S27 in its velocity tuple.
PacketReceiveEvent is the universal hook: every S27 consumer in the corpus registers on the receive path before the vanilla handler applies the knockback.
Classic clients mutate or cancel the packet object inside the event. Rise 5.99/6.x call event.setPacket / event.setCancelled on their own event bus. Tenacity and Spicy use IEventListener-style lambda handlers. Rise 6.x additionally routes S27 through components (ItemDamageComponent, PingSpoofComponent) and a security layer (ExplosionCheck) in addition to modules. LiquidSense Dev touches S27 only through an unused import in PingSpoof.java; its velocity handling does not exist in this build.

anticheat Anti-Cheat Checks

S27 is the explosion packet: it carries the knockback vector the client must apply plus the destroyed block records. Anticheats read the velocity component on the OUT side and require it in the client's subsequent motion, exactly like entity knockback, and the block records give simulation anticheats the world mutation the explosion caused. The corpus shows two approaches: Grim brackets the explosion vector with transactions and flags when the prediction misses it, while NCP and Intave read the vector straight off the wire (NCP feeds it into the moving velocity model, Intave into its motion tracker).

ExplosionHandler / AntiExplosion (Grim) (GrimAnticheat-Grim)

Requires the client's simulated motion to include the explosion knockback vector, flagging players who ignore it.

On the OUT explosion packet, applies the destroyed block records to the compensated world (with 1.21.2+ handling where blocks arrive via separate block-change packets) and records the knockback vector in a transaction-bracketed queue. On each prediction complete, the offset between the player's actual movement and the required explosion velocity is measured; offsets above the configured threshold flag with a setback, and knockback-overridden explosions are exempted by comparing transaction ordering.

Detects: Anti-explosion and velocity-cancel cheats that ignore explosion knockback, and world-desync from missing block destruction.

Source: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/velocity/ExplosionHandler.java

Variations: NCP and Intave read the vector directly; Grim additionally simulates the block destruction, which is unique in the corpus.
VelocityAdapter (NoCheatPlus) (Updated-NoCheatPlus-NoCheatPlus)

Feeds the explosion knockback vector into NCP's moving velocity model so survivalfly and other movement checks allow it.

ProtocolLib adapter on the OUT explosion packet: reads the three velocity floats (indices 1-3), skips packets with zero velocity, and adds the vector to the player's MovingData with the ORIGIN_EXPLOSION and ADDITIVE flags. The moving checks then know the player was legitimately pushed and subtract the explosion velocity from their expected motion.

Detects: Anti-explosion cheats are caught indirectly: without the recorded push, the movement checks treat the explosion's motion as impossible.

Source: Updated-NoCheatPlus-NoCheatPlus, NCPCompatProtocolLib/src/main/java/fr/neatmonster/nocheatplus/checks/net/protocollib/VelocityAdapter.java

Variations: Grim requires the exact vector in prediction; NCP adds it to an expected-motion model that moving checks consume.
ExplosionReader (Intave) (intave-intave)

Reads and rewrites the explosion knockback vector into the Intave motion abstraction for both simulation and mitigation.

ProtocolLib reader over the OUT explosion packet: on pre-1.21.3 servers it reads velocity floats 1-3, on 1.21.3+ it reads the optional motion vector, converting either into a Motion value; setMotion writes the value back. The motion feeds Intave's fake-player simulation and its mitigation layer, which can resend corrected motion.

Detects: Anti-explosion and knockback reduction, detected through the simulation's motion comparison and mitigated by rewriting the sent vector.

Source: intave-intave, src/main/java/de/jpx3/intave/packet/reader/ExplosionReader.java

Variations: NCP reads floats only; Intave supports both wire formats and can write the vector back, which NCP never does.

Wiki Cross-Reference

The packet is sent for explosions from creepers, TNT and ghast fireballs, carrying center, strength, affected-block records and a per-player knockback vector.

MCP 1.8.9 S27PacketExplosion implements Packet dispatching to INetHandlerPlayClient.handleExplosion; wire serde is readPacketData/writePacketData via readByte, readFloat, readInt.

1.8.9 callers: WorldServer.newExplosion sends new S27PacketExplosion (line 1019): 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.