0x27 S27PacketExplosion
Server notifies the client of an explosion (TNT, creeper, bed in Nether/End, etc).
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| x/y/z | float | Explosion center |
| strength | float | Explosion power/strength |
| affectedBlockPositions | List<BlockPos> | Blocks destroyed by the explosion |
| motionX/Y/Z | float | Player knockback velocity from the explosion |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| X | float | |
| Y | float | |
| Z | float | |
| Radius | float | |
| Record Count | int | |
| Records | byte array | Relative positions of affected blocks |
| Player Motion X | float | |
| Player Motion Y | float | |
| Player Motion Z | float |
MCP References
NetHandlerPlayClient.handleExplosion()Handler Interface
INetHandlerPlayClientNotes
Vanilla Source
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 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.
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.
// ===== FILE: Tenacity 6.0, dev/tenacity/module/impl/movement/VelocityModule.java =====
package dev.tenacity.module.impl.movement;
import dev.tenacity.event.IEventListener;
import dev.tenacity.event.impl.packet.PacketReceiveEvent;
import dev.tenacity.module.Module;
import dev.tenacity.module.ModuleCategory;
import dev.tenacity.setting.impl.NumberSetting;
import net.minecraft.network.play.server.S12PacketEntityVelocity;
import net.minecraft.network.play.server.S27PacketExplosion;
public final class VelocityModule extends Module {
private final NumberSetting horizontalVelocity = new NumberSetting("Horizontal Velocity", 0, 0, 100, 0.1),
verticalVelocity = new NumberSetting("Vertical Velocity", 0, 0, 100, 0.1);
public VelocityModule() {
super("Velocity", "Removes your velocity movement aspect", ModuleCategory.MOVEMENT);
initializeSettings(horizontalVelocity, verticalVelocity);
}
private final IEventListener<PacketReceiveEvent> onPacketReceiveEvent = event -> {
if(event.getPacket() instanceof S12PacketEntityVelocity) {
final S12PacketEntityVelocity s12 = (S12PacketEntityVelocity) event.getPacket();
if(s12.getEntityID() == mc.thePlayer.getEntityId()) {
if(horizontalVelocity.getCurrentValue() == 0 && verticalVelocity.getCurrentValue() == 0) {
event.cancel();
return;
}
s12.motionX *= (int) (horizontalVelocity.getCurrentValue() / 100);
s12.motionY *= (int) (verticalVelocity.getCurrentValue() / 100);
s12.motionZ *= (int) (horizontalVelocity.getCurrentValue() / 100);
}
}
if(event.getPacket() instanceof S27PacketExplosion) {
final S27PacketExplosion s27 = (S27PacketExplosion) event.getPacket();
if(horizontalVelocity.getCurrentValue() == 0 && verticalVelocity.getCurrentValue() == 0) {
event.cancel();
return;
}
s27.motionX *= (float) (horizontalVelocity.getCurrentValue() / 100);
s27.motionY *= (float) (verticalVelocity.getCurrentValue() / 100);
s27.motionZ *= (float) (horizontalVelocity.getCurrentValue() / 100);
}
};
}
// NOTE (AI): Tenacity's implementation is the cleanest scaling example: the same PacketReceiveEvent handler covers S12 and S27, cancels when both sliders are 0, otherwise scales the float fields in place. Note the S27 branch has no entity-ID check (the packet is per-player) while the S12 branch does. Memeware and Nekoware ship a shorter cancel-only variant; Spicy's AntiKnockback cancels S27 in the same event shape.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
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/combat/velocity/StandardVelocity.java =====
package com.alan.clients.module.impl.combat.velocity;
import com.alan.clients.Client;
import com.alan.clients.event.Listener;
import com.alan.clients.event.Priorities;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.motion.PreMotionEvent;
import com.alan.clients.event.impl.other.TeleportEvent;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.module.impl.combat.Criticals;
import com.alan.clients.module.impl.combat.Velocity;
import com.alan.clients.module.impl.movement.Speed;
import com.alan.clients.util.packet.PacketUtil;
import com.alan.clients.util.player.MoveUtil;
import com.alan.clients.value.Mode;
import com.alan.clients.value.impl.BooleanValue;
import com.alan.clients.value.impl.NumberValue;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C07PacketPlayerDigging;
import net.minecraft.network.play.server.S12PacketEntityVelocity;
import net.minecraft.network.play.server.S27PacketExplosion;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
public final class StandardVelocity extends Mode<Velocity> {
public Boolean disable2 = false;
private Integer time = 0;
private Speed speed = null;
private String mode = null;
private int amount;
private final NumberValue horizontal = new NumberValue("Horizontal", this, 0, 0, 100, 1);
private final NumberValue vertical = new NumberValue("Vertical", this, 0, 0, 100, 1);
private final BooleanValue onExplode = new BooleanValue("Explosion Ignore", this, false);
@Override
public void onEnable() {
time = 0;
setDisable2(false);
}
public StandardVelocity(String name, Velocity parent) {
super(name, parent);
}
@EventLink(value = Priorities.VERY_LOW)
public final Listener<PacketReceiveEvent> onPacketReceiveEvent = event -> {
if ((getParent().onSwing.getValue() && !mc.thePlayer.isSwingInProgress) || event.isCancelled()) {
return;
}
final Packet<?> p = event.getPacket();
final double horizontal = this.horizontal.getValue().doubleValue();
final double vertical = this.vertical.getValue().doubleValue();
final boolean onExplode = this.onExplode.getValue();
if (p instanceof S12PacketEntityVelocity) {
final S12PacketEntityVelocity wrapper = (S12PacketEntityVelocity) p;
if (wrapper.getEntityID() == mc.thePlayer.getEntityId()) {
if (horizontal == 0) {
if (vertical != 0 && !event.isCancelled()) {
mc.thePlayer.motionY = wrapper.getMotionY() / 8000.0D;
}
event.setCancelled();
return;
}
wrapper.motionX *= horizontal / 100;
wrapper.motionY *= vertical / 100;
wrapper.motionZ *= horizontal / 100;
event.setPacket(wrapper);
}
} else if (p instanceof S27PacketExplosion) {
final S27PacketExplosion wrapper = (S27PacketExplosion) p;
if (onExplode) {
event.setCancelled();
return;
}
wrapper.posX *= horizontal / 100;
wrapper.posY *= vertical / 100;
wrapper.posZ *= horizontal / 100;
event.setPacket(wrapper);
}
};
@EventLink
public final Listener<PreMotionEvent> onPreMotionEvent = event -> {
if (speed == null) {
speed = getModule(Speed.class);
}
/*
if(speed.isEnabled() && Client.INSTANCE.getModuleManager().get(Speed.class).mode.getValue().getName().equals("Watchdog")) {
if (mc.thePlayer.hurtTime > 9) {
mc.thePlayer.motionZ *= 0;
mc.thePlayer.motionX *= 0;
time++;
if (!MoveUtil.isMoving()) {
mc.thePlayer.motionZ *= 0;
mc.thePlayer.motionX *= 0;
}
}
if (mc.thePlayer.hurtTime == 9) {
if (MoveUtil.isMoving() && !mc.thePlayer.onGround && !( mc.thePlayer.offGroundTicks == 1)) {
// MoveUtil.partialStrafePercent(99);
double speed =1;
speed = Math.random()/50;
MoveUtil.strafe(.3);
// mc.thePlayer.motionZ *= .95;
// mc.thePlayer.motionX *= .95;
} else {
mc.thePlayer.motionZ *= -.2;
mc.thePlayer.motionX *= -.2;
}
}
}
*/
};
@EventLink
public final Listener<TeleportEvent> onTeleport = event -> {
if (event.getPosY() < mc.thePlayer.posY - 2);
};
public Boolean getDisable2() {
return disable2;
}
public void setDisable2(Boolean disable2) {
this.disable2 = disable2;
}
}
// NOTE (AI): StandardVelocity shows the shared skeleton: horizontal/vertical NumberValues, an Explosion Ignore toggle, and one PacketReceiveEvent that branches S12 vs S27. The S27 branch scales posX/posY/posZ (Rise renamed the motion fields) and re-sets the packet on the event. The commented block in onPreMotionEvent is dead Watchdog-era code, kept in the file. Vulcan/Redesky/UniversoCraft variants in the same folder are shorter and mostly cancel S27 outright.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.
// ===== FILE: Rise 5.99, dev/rise/module/impl/movement/LongJump.java =====
/*
Copyright Alan Wood 2021
None of this code to be reused without my written permission
Intellectual Rights owned by Alan Wood
*/
package dev.rise.module.impl.movement;
import de.gerrygames.viarewind.utils.ChatUtil;
import dev.rise.Rise;
import dev.rise.event.impl.motion.PreMotionEvent;
import dev.rise.event.impl.other.MoveButtonEvent;
import dev.rise.event.impl.other.MoveEvent;
import dev.rise.event.impl.other.StrafeEvent;
import dev.rise.event.impl.packet.PacketReceiveEvent;
import dev.rise.event.impl.packet.PacketSendEvent;
import dev.rise.event.impl.render.Render2DEvent;
import dev.rise.module.Module;
import dev.rise.module.api.ModuleInfo;
import dev.rise.module.enums.Category;
import dev.rise.setting.impl.BooleanSetting;
import dev.rise.setting.impl.ModeSetting;
import dev.rise.setting.impl.NumberSetting;
import dev.rise.util.math.MathUtil;
import dev.rise.util.player.DamageUtil;
import dev.rise.util.player.MoveUtil;
import dev.rise.util.player.PacketUtil;
import dev.rise.util.player.PlayerUtil;
import dev.rise.util.render.RenderUtil;
import dev.rise.util.render.theme.ThemeType;
import dev.rise.util.render.theme.ThemeUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockAir;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.*;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.*;
import net.minecraft.network.play.server.S12PacketEntityVelocity;
import net.minecraft.network.play.server.S27PacketExplosion;
import net.minecraft.potion.Potion;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import org.apache.commons.lang3.RandomUtils;
import java.awt.*;
import java.util.concurrent.ConcurrentLinkedQueue;
@ModuleInfo(name = "LongJump", description = "Does a long jump", category = Category.MOVEMENT)
public final class LongJump extends Module {
private final ModeSetting mode = new ModeSetting("Mode", this, "Redesky", "Redesky", "Redesky 2", "Cubecraft", "Hypixel", "NCP", "Minemenclub", "Minemenclub Safe", "Vulcan", "Taka");
private final ModeSetting ncpMode = new ModeSetting("NCP Mode", this, "Normal", "Normal", "Damage");
private final BooleanSetting smoothCamera = new BooleanSetting("Smooth Camera", this, false);
private final BooleanSetting autoDisable = new BooleanSetting("Auto Disable", this, true);
private final NumberSetting onGroundSpeed = new NumberSetting("On Ground Speed", this, 0.4, 0.1, 3, 0.1);
private final NumberSetting offGroundSpeed = new NumberSetting("Off Ground Speed", this, 1.4, 0.1, 3, 0.1);
private final NumberSetting timer = new NumberSetting("Timer", this, 1, 0.1, 2, 0.1);
private final NumberSetting viewBobbing = new NumberSetting("View Bobbing", this, 0, 0, 0.1, 0.01);
private final NumberSetting hypixelTimer = new NumberSetting("Hypixel Timer", this, 1, .1, 2.25, 0.05);
private boolean beingDmged, jumped, reset, glide, receivedDamage, boosted;
private int offGroundTicks, stage, jumps;
private int ticks, i;
private int waitTicks;
private float oPositionY;
private double moveSpeed, lastDist, startX, startY, startZ;
private final ConcurrentLinkedQueue<Packet<?>> packetList = new ConcurrentLinkedQueue<>();
@Override
public void onUpdateAlwaysInGui() {
offGroundSpeed.hidden = onGroundSpeed.hidden = !(mode.is("NCP") && ncpMode.is("Normal"));
timer.hidden = !(mode.is("NCP"));
ncpMode.hidden = !mode.is("NCP");
hypixelTimer.hidden = !mode.is("Hypixel");
}
@Override
protected void onEnable() {
waitTicks = 0;
offGroundTicks = 0;
reset = glide = receivedDamage = boosted = false;
ticks = stage = i = jumps = 0;
startX = mc.thePlayer.posX;
startY = mc.thePlayer.posY;
startZ = mc.thePlayer.posZ;
switch (mode.getMode()) {
case "Hycraft":
if (!mc.thePlayer.onGround) {
this.registerNotification("Cannot enable " + this.getModuleInfo().name() + " in air.");
this.toggleModule();
}
break;
case "Taka":
mc.timer.timerSpeed = 0.2F;
for (int i = 0; i < 8; i++) {
PacketUtil.sendPacket(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.42F, mc.thePlayer.posZ, false));
PacketUtil.sendPacket(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, false));
}
break;
case "Vulcan":
if (!mc.thePlayer.onGround) {
this.registerNotification("Cannot enable " + this.getModuleInfo().name() + " in air.");
this.toggleModule();
}
break;
}
oPositionY = (float) mc.thePlayer.posY;
}
@Override
protected void onDisable() {
boosted = false;
mc.thePlayer.speedInAir = 0.02f;
mc.thePlayer.jumpMovementFactor = 0.02F;
mc.timer.timerSpeed = 1;
EntityPlayer.enableCameraYOffset = false;
moveSpeed = lastDist = 0;
beingDmged = false;
jumped = false;
switch (mode.getMode()) {
case "NCP":
if (ncpMode.is("Damage") && mc.thePlayer.inventory.currentItem != i)
PacketUtil.sendPacketWithoutEvent(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem));
break;
}
if (!mc.isIntegratedServerRunning()) {
}
}
@Override
public void onMove(final MoveEvent event) {
switch (mode.getMode()) {
case "NCP":
if (ncpMode.is("Damage")) {
if (mc.thePlayer.hurtTime > 0)
jumped = true;
if (!jumped)
return;
if (MoveUtil.isMoving() && !mc.thePlayer.isCollidedHorizontally) {
mc.timer.timerSpeed = (float) timer.getValue();
if (mc.thePlayer.onGround) {
moveSpeed = Math.max(0.2873 * 2.15, moveSpeed);
reset = true;
} else if (reset) {
moveSpeed += 0.15 * (moveSpeed - 0.2873);
reset = false;
} else {
moveSpeed = lastDist - lastDist / 159.998;
}
} else {
mc.timer.timerSpeed = 1;
moveSpeed = 0;
}
MoveUtil.setMoveEventSpeed(event, Math.max(moveSpeed, 0.2873));
switch (stage) {
case 0:
if (mc.thePlayer.onGround) {
event.setY(mc.thePlayer.motionY = (0.424 - Math.random() / 500));
stage++;
}
break;
case 1:
event.setY(mc.thePlayer.motionY = 0.42F);
stage++;
break;
case 2:
case 3:
case 4:
case 5:
stage++;
break;
}
if (glide) {
event.setY(mc.thePlayer.motionY += (0.045 - Math.random() / 500));
stage++;
}
}
break;
}
}
@Override
public void onPacketReceive(final PacketReceiveEvent event) {
final Packet<?> p = event.getPacket();
if (mode.is("Hycraft") && (p instanceof S12PacketEntityVelocity || p instanceof S27PacketExplosion)) {
event.setCancelled(true);
}
if (mode.is("Vulcan") && (p instanceof S12PacketEntityVelocity || p instanceof S27PacketExplosion))
event.setCancelled(true);
}
@Override
public void onPacketSend(final PacketSendEvent event) {
final Packet<?> p = event.getPacket();
switch (mode.getMode()) {
case "Vulcan":
if (!receivedDamage && p instanceof C03PacketPlayer)
event.setCancelled(true);
if (p instanceof C0FPacketConfirmTransaction || p instanceof C00PacketKeepAlive) {
packetList.add(p);
event.setCancelled(true);
}
break;
case "Hypixel":
break;
}
}
@Override
public void onStrafe(final StrafeEvent event) {
switch (mode.getMode()) {
case "Minemenclub":
case "Minemenclub Safe":
if (!jumped)
event.setCancelled(true);
break;
case "NCP":
if (ncpMode.is("Damage") && !jumped)
event.setCancelled(true);
break;
case "Vulcan":
if (!receivedDamage)
event.setCancelled(true);
break;
}
}
@Override
public void onRender2DEvent(final Render2DEvent event) {
// if(mode.is("Hypixel")) {
// final float x = (float) 445;
// final float y = (float) 260;
//
// final float width = (float) (5 + (waitTicks * 1.935));
// final float height = 6;
// RenderUtil.rect(x, y, 68.9, height, new Color(0, 0, 0, 100));
//
// RenderUtil.rect(x, y, width, height, ThemeUtil.getThemeColor(ThemeType.GENERAL));
// }
}
@Override
public void onMoveButton(MoveButtonEvent event) {
if (mode.is("Hypixel")) {
if (ticks <= 11 * 3) {
event.setForward(false);
event.setBackward(false);
event.setLeft(false);
event.setRight(false);
}
}
}
@Override
public void onPreMotion(final PreMotionEvent event) {
//Utils
++ticks;
if (mc.thePlayer.ticksExisted == 1) {
toggleModule();
}
if (mc.thePlayer.onGround) {
if (autoDisable.isEnabled() && (!(mode.is("Minemenclub") || mode.is("Minemenclub Safe")) ? offGroundTicks > 0 : offGroundTicks > 5) && !mode.getMode().equals("Hypixel")) {
this.toggleModule();
return;
}
offGroundTicks = 0;
} else {
offGroundTicks++;
}
final double x = mc.thePlayer.posX - mc.thePlayer.prevPosX;
final double z = mc.thePlayer.posZ - mc.thePlayer.prevPosZ;
lastDist = Math.hypot(x, z);
EntityPlayer.enableCameraYOffset = false;
if (smoothCamera.isEnabled()) {
if (mc.thePlayer.posY > oPositionY) {
EntityPlayer.enableCameraYOffset = true;
EntityPlayer.cameraYPosition = oPositionY;
}
}
mc.thePlayer.cameraYaw = (float) viewBobbing.getValue();
switch (mode.getMode()) {
case "Redesky":
if (mc.thePlayer.onGround) {
mc.thePlayer.jump();
mc.thePlayer.motionZ *= 1.2;
mc.thePlayer.motionX *= 1.2;
}
if (offGroundTicks == 1) {
mc.thePlayer.motionZ *= 1.2;
mc.thePlayer.motionX *= 1.2;
}
break;
case "Redesky 2":
if (mc.thePlayer.isCollidedHorizontally) {
toggleModule();
return;
}
final Block block2 = mc.thePlayer.worldObj.getBlockState(new BlockPos(
MathHelper.floor_double(mc.thePlayer.posX),
MathHelper.floor_double(mc.thePlayer.getEntityBoundingBox().minY - 0.5) - 1,
MathHelper.floor_double(mc.thePlayer.posZ))).getBlock();
if (ticks > 10 && !(block2 instanceof BlockAir)) {
toggleModule();
return;
}
mc.timer.timerSpeed = (float) (0.5 + Math.random() / 10);
if (mc.thePlayer.onGround) {
mc.thePlayer.jump();
}
if (!mc.thePlayer.onGround) {
mc.thePlayer.jumpMovementFactor = 0.18f;
mc.thePlayer.motionY += mc.thePlayer.motionY > 0.0 ? 0.055 : mc.thePlayer.motionY < 0.3 ? 0.01 : 0.03;
}
break;
case "Minemenclub Safe":
if (MoveUtil.isMoving() && (PlayerUtil.isOnServer("minemen") || PlayerUtil.isOnServer("mineman"))) {
if (mc.thePlayer.onGround) {
if (!beingDmged) {
event.setY(event.getY() - (2.5 - Math.random() / 100));
jumped = false;
moveSpeed = 0;
} else {
jumped = true;
moveSpeed = MoveUtil.getBaseMoveSpeed() + (0.32 - Math.random() / 100);
mc.thePlayer.jump();
mc.thePlayer.motionY = MoveUtil.getJumpMotion((float) (0.6 - Math.random() / 100));
}
} else
MoveUtil.strafe();
} else
moveSpeed = 0;
beingDmged = mc.thePlayer.onGround && mc.thePlayer.hurtTime > 0;
MoveUtil.strafe(moveSpeed);
break;
case "Minemenclub":
if (MoveUtil.isMoving() && (PlayerUtil.isOnServer("minemen") || PlayerUtil.isOnServer("mineman"))) {
if (mc.thePlayer.onGround) {
if (!beingDmged) {
event.setY(event.getY() - (2.5 - Math.random() / 100));
jumped = false;
moveSpeed = 0;
} else {
jumped = true;
moveSpeed = MoveUtil.getBaseMoveSpeed() + (1 - Math.random() / 100);
mc.thePlayer.motionY = MoveUtil.getJumpMotion((float) (0.6 - Math.random() / 100));
}
} else
MoveUtil.strafe();
} else
moveSpeed = 0;
beingDmged = mc.thePlayer.onGround && mc.thePlayer.hurtTime > 0;
MoveUtil.strafe(moveSpeed);
break;
case "Cubecraft":
if (MoveUtil.isMoving()) {
switch (offGroundTicks) {
case 0:
DamageUtil.damagePlayer(DamageUtil.DamageType.POSITION, 0.0465, false, true);
mc.thePlayer.jump();
mc.thePlayer.motionY = MoveUtil.getJumpMotion((float) (0.6 + (Math.random() / 100)));
MoveUtil.strafe(0.4 - (Math.random() / 500));
break;
case 1:
MoveUtil.strafe(0.6 - (Math.random() / 500));
break;
}
if (mc.thePlayer.fallDistance > 0 && mc.thePlayer.fallDistance < 3)
mc.thePlayer.motionY += 0.0425 + (Math.random() / 500);
} else
MoveUtil.stop();
MoveUtil.strafe();
break;
case "NCP":
switch (ncpMode.getMode()) {
case "Normal": {
if (MoveUtil.isMoving()) {
if (mc.thePlayer.onGround) {
mc.thePlayer.jump();
mc.thePlayer.motionY = MoveUtil.getJumpMotion((float) (0.424 - Math.random() / 500));
MoveUtil.strafe(onGroundSpeed.getValue());
}
if (offGroundTicks == 1)
MoveUtil.strafe(offGroundSpeed.getValue());
if (mc.thePlayer.fallDistance > 0 && mc.thePlayer.fallDistance < 3)
mc.thePlayer.motionY += 0.03 + Math.random() / 500;
mc.timer.timerSpeed = (float) timer.getValue();
} else {
MoveUtil.stop();
mc.timer.timerSpeed = 1;
}
MoveUtil.strafe();
break;
}
case "Damage": {
ItemStack itemStack;
if (!jumped)
event.setPitch(-RandomUtils.nextFloat(89, 90));
int sexySlot = -1;
int shitSlot = -1;
if (!beingDmged) {
for (i = 0; i < 9; ++i) {
itemStack = mc.thePlayer.inventoryContainer.getSlot(i + 36).getStack();
if (itemStack != null) {
final Item item = itemStack.getItem();
if (itemStack.getItem() instanceof ItemBow) {
for (int i = 0; i < mc.thePlayer.inventory.mainInventory.length; i++) {
final ItemStack stack = mc.thePlayer.inventory.mainInventory[i];
if (stack != null) {
if (stack.getItem().getUnlocalizedName().contains("arrow")) {
sexySlot = this.i;
}
}
}
}
if (item instanceof ItemFishingRod || item instanceof ItemSnowball || item instanceof ItemEgg) {
shitSlot = i;
}
}
}
if (sexySlot != -1) {
itemStack = mc.thePlayer.inventoryContainer.getSlot(sexySlot + 36).getStack();
if (mc.thePlayer.inventory.currentItem != sexySlot && ticks == 1) {
PacketUtil.sendPacketWithoutEvent(new C09PacketHeldItemChange(sexySlot));
}
if (ticks == 5 + randomInt(0, 1)) {
mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(itemStack));
}
ticks++;
if (ticks == 11 + randomInt(1, 2)) {
PacketUtil.sendPacketWithoutEvent(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, EnumFacing.DOWN));
beingDmged = true;
}
} else if (shitSlot != -1) {
itemStack = mc.thePlayer.inventoryContainer.getSlot(shitSlot + 36).getStack();
if (mc.thePlayer.inventory.currentItem != shitSlot)
PacketUtil.sendPacketWithoutEvent(new C09PacketHeldItemChange(shitSlot));
mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(itemStack));
beingDmged = true;
}
}
break;
}
}
break;
case "Vulcan": {
final double[] jumpValues = new double[]{0.42F, 0.33319999363422365, 0.24813599859094576, 0.16477328182606651, 0.08307781780646721, 0.0030162615090425808};
if (mc.thePlayer.onGround && ticks == 5 && !beingDmged) {
for (int i = 0; i < 6; i++) {
double position = mc.thePlayer.posY;
for (final double value : jumpValues) {
position += value;
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, position, mc.thePlayer.posZ, false));
}
}
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer(true));
event.setGround(true);
beingDmged = true;
}
if (mc.thePlayer.hurtTime > 0)
receivedDamage = true;
if (receivedDamage) {
mc.timer.timerSpeed = 1;
if (!boosted) {
float motion = 0.6F;
if (PlayerUtil.getBlockRelativeToPlayer(0, -0.5, 0).getUnlocalizedName().contains("bed"))
motion = 1.5F;
mc.thePlayer.motionY = motion - (Math.random() / 100);
MoveUtil.strafe(9.5 - (Math.random() / 500));
boosted = true;
} else if (offGroundTicks == 1)
MoveUtil.strafe(0.5 - (Math.random() / 500));
if (mc.thePlayer.fallDistance > 0)
mc.thePlayer.motionY += 0.02 - (Math.random() / 10000);
}
break;
}
case "Taka": {
if (mc.thePlayer.hurtTime == 9) {
ticks = 0;
mc.timer.timerSpeed = 1.0F;
MoveUtil.strafe(9.85F);
mc.thePlayer.motionY = 0.42F;
}
if (ticks < 13) {
MoveUtil.strafe(9.85F);
}
if (ticks == 13) {
MoveUtil.strafe(0.25F);
}
break;
}
case "Hypixel": {
MoveUtil.strafe();
if (ticks <= 11 * 3) {
waitTicks++;
mc.timer.timerSpeed = 5.25F;
if (mc.thePlayer.onGround) {
mc.thePlayer.motionY = 0.42f;
}
mc.thePlayer.cameraYaw = 0;
mc.thePlayer.cameraPitch = 0;
mc.thePlayer.posY -= mc.thePlayer.posY - mc.thePlayer.lastTickPosY;
mc.thePlayer.lastTickPosY -= mc.thePlayer.posY - mc.thePlayer.lastTickPosY;
MoveUtil.stop();
event.setGround(false);
if (mc.thePlayer.hurtTime > 0) {
toggleModule();
this.registerNotification("Disabled " + this.getModuleInfo().name() + " due to damage before intial jump.");
}
} else {
mc.timer.timerSpeed = (float) hypixelTimer.getValue();
if (mc.thePlayer.hurtTime > 0) {
receivedDamage = true;
}
if (mc.thePlayer.onGround) {
if (ticks <= 11 * 4) {
mc.thePlayer.motionY = 0.76 - Math.random() / 100;
} else if (autoDisable.isEnabled()) {
toggleModule();
}
}
if (offGroundTicks > 15) {
MoveUtil.strafe();
return;
}
switch (offGroundTicks) {
case 1:
if (!mc.thePlayer.isPotionActive(Potion.moveSpeed)) {
MoveUtil.strafe(MoveUtil.getBaseMoveSpeed() * 1.6 - Math.random() / 100);
} else {
MoveUtil.strafe(MoveUtil.getBaseMoveSpeed() * 1.7 - Math.random() / 100);
}
break;
}
if (offGroundTicks > 1 && !mc.thePlayer.isPotionActive(Potion.moveSpeed)) {
MoveUtil.strafe(MoveUtil.getBaseMoveSpeed() * 1.07 - Math.random() / 100);
}
if (offGroundTicks > 1 && mc.thePlayer.isPotionActive(Potion.moveSpeed)) {
MoveUtil.strafe(MoveUtil.getBaseMoveSpeed() * 1.02 - Math.random() / 100);
}
if (!mc.thePlayer.onGround) {
mc.thePlayer.motionY += 0.027f - Math.random() / 100;
}
if (offGroundTicks <= 5 && offGroundTicks > 1) {
MoveUtil.strafe(MoveUtil.getSpeed() * 1.29);
}
}
break;
}
}
}
}
// NOTE (AI): The relevant surface is onPacketReceive: Hycraft and Vulcan modes cancel both S12 and S27 before the vanilla handler can apply them. The rest of the file is the staged jump state machine (position spoofing for Vulcan, damage-triggered boosts, timer manipulation). This is a movement module that treats S27 purely as an obstacle to filter, unlike a velocity module that scales it.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.
// ===== FILE: Tenacity 6.0, dev/tenacity/module/impl/misc/AntiExploit.java =====
package dev.tenacity.module.impl.misc;
import dev.tenacity.event.IEventListener;
import dev.tenacity.event.impl.packet.PacketReceiveEvent;
import dev.tenacity.module.Module;
import dev.tenacity.module.ModuleCategory;
import dev.tenacity.util.misc.ChatUtil;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C19PacketResourcePackStatus;
import net.minecraft.network.play.server.*;
import java.net.URI;
import java.net.URISyntaxException;
public class AntiExploit extends Module {
private long lastExplosion = 0, lastExperience = 0;
private int invalidExperience = 0;
final int PACKET_THRESHOLD = 100;
final long CHECK_INTERVAL = 1000;
int packetCount = 0;
public AntiExploit() {
super("AntiExploit", "Prevents server exploits", ModuleCategory.MISC);
}
private final IEventListener<PacketReceiveEvent> onReceivePacket = event -> {
Packet<?> packet = event.getPacket();
handlePacketCount();
if(packet instanceof S48PacketResourcePackSend) {
S48PacketResourcePackSend resourcePack = (S48PacketResourcePackSend) packet;
try {
URI uri = new URI(resourcePack.getURL());
String scheme = uri.getScheme();
boolean isLevelProtocol = scheme.equalsIgnoreCase("level");
boolean isHttpProtocol = scheme.equalsIgnoreCase("http");
boolean isHttpsProtocol = scheme.equalsIgnoreCase("https");
if(!isHttpProtocol && !isHttpsProtocol && !isLevelProtocol) {
ChatUtil.print("§cBlocked Exploit: Resource Pack");
event.cancel();
} else if(isLevelProtocol && (resourcePack.getURL().contains("..") || !((S48PacketResourcePackSend) packet).getURL().endsWith("/resources.zip"))) {
ChatUtil.print("§cBlocked Exploit: File Access");
event.cancel();
mc.getNetHandler().addToSendQueue(new C19PacketResourcePackStatus(((S48PacketResourcePackSend) packet).getHash(), C19PacketResourcePackStatus.Action.FAILED_DOWNLOAD));
}
} catch (URISyntaxException exception) {
ChatUtil.print("§cBlocked Exploit: Resource Pack");
event.cancel();
mc.getNetHandler().addToSendQueue(new C19PacketResourcePackStatus(((S48PacketResourcePackSend) packet).getHash(), C19PacketResourcePackStatus.Action.FAILED_DOWNLOAD));
}
} else if(packet instanceof S43PacketCamera && !mc.thePlayer.isSpectator()) {
ChatUtil.print("§cBlocked Exploit: Crash");
event.cancel();
} else if(packet instanceof S2APacketParticles) {
S2APacketParticles particles = (S2APacketParticles) packet;
if(Math.abs(particles.getParticleSpeed()) >= 1) {
ChatUtil.print("§cBlocked Exploit: Particles");
event.cancel();
} else if(((S2APacketParticles) packet).getParticleCount() > 1) {
ChatUtil.print("§cBlocked Exploit: Crash");
event.cancel();
}
} else if(packet instanceof S27PacketExplosion) {
S27PacketExplosion explosion = (S27PacketExplosion) packet;
if(Math.abs(explosion.getStrength()) > 1) {
ChatUtil.print("§cBlocked Exploit: Crash");
event.cancel();
} else if(System.currentTimeMillis() - lastExplosion <= 1) {
ChatUtil.print("§cBlocked Exploit: Crash");
event.cancel();
} else if(packet instanceof S2APacketParticles) {
S2APacketParticles particles = (S2APacketParticles) packet;
if(Math.abs(particles.getParticleSpeed()) > 1) {
ChatUtil.print("§cBlocked Exploit: Particles");
event.cancel();
} else if(particles.getParticleCount() >= 1) {
ChatUtil.print("§cBlocked Exploit: Crash");
event.cancel();
}
}
lastExplosion = System.currentTimeMillis();
} else if(packet instanceof S18PacketEntityTeleport) {
S18PacketEntityTeleport teleport = (S18PacketEntityTeleport) packet;
double packetX = Math.abs(teleport.getX());
double packetY = Math.abs(teleport.getY());
double packetZ = Math.abs(teleport.getZ());
if(packetX > 30000000 || packetY > 30000000 || packetZ > 30000000) {
ChatUtil.print("§cBlocked Exploit: Teleport");
event.cancel();
}
} else if(packet instanceof S11PacketSpawnExperienceOrb) {
if(System.currentTimeMillis() - lastExperience <= 1) {
invalidExperience++;
if(invalidExperience >= 2) {
ChatUtil.print("§cBlocked Exploit: Crash");
event.cancel();
}
} else {
invalidExperience = 0;
}
lastExperience = System.currentTimeMillis();
}
};
private void triggerKick() {
ChatUtil.print("§cAbnormal packet activity detected. Kicking player...");
}
private void handlePacketCount() {
long currentTime = System.currentTimeMillis();
long lastPacketCheckTime = 0;
if (currentTime - lastPacketCheckTime > CHECK_INTERVAL) {
packetCount = 0;
lastPacketCheckTime = currentTime;
}
packetCount++;
if (packetCount > PACKET_THRESHOLD) {
triggerKick();
packetCount = 0;
}
}
}
// NOTE (AI): The S27 branch is the third check in the chain: strength bound, then a 1 ms inter-arrival gate keyed on lastExplosion. The threshold is deliberately strict because vanilla explosion strength is at most ~4.0 for TNT and ~6.0 for beds, so anything above 1.0 is already anomalous. Note the duplicated S2A branch and the packet-count throttle, which protect against the same flood from the particle side.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.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/other/Debugger.java =====
package com.alan.clients.module.impl.other;
import com.alan.clients.Client;
import com.alan.clients.component.impl.player.BlinkComponent;
import com.alan.clients.component.impl.render.ESPComponent;
import com.alan.clients.event.Listener;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.motion.PreMotionEvent;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.event.impl.packet.PacketSendEvent;
import com.alan.clients.event.impl.render.Render2DEvent;
import com.alan.clients.module.Module;
import com.alan.clients.module.api.Category;
import com.alan.clients.module.api.ModuleInfo;
import com.alan.clients.util.chat.ChatUtil;
import com.alan.clients.util.interfaces.ThreadAccess;
import com.alan.clients.util.math.MathUtil;
import com.alan.clients.util.render.RenderUtil;
import com.alan.clients.util.vector.Vector2d;
import com.alan.clients.value.impl.BooleanValue;
import com.alan.clients.value.impl.DragValue;
import net.minecraft.client.Minecraft;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.server.*;
import net.minecraft.util.EnumChatFormatting;
import rip.vantage.commons.util.time.StopWatch;
import java.awt.*;
import java.lang.reflect.Field;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import static com.alan.clients.layer.Layers.*;
@ModuleInfo(aliases = {"module.other.debugger.name"}, category = Category.PLAYER, description = "module.other.debugger.description")
public final class Debugger extends Module implements ThreadAccess {
private final BooleanValue transaction = new BooleanValue("Transactions", this, true);
private final BooleanValue keepAlive = new BooleanValue("Keep Alive", this, true);
private final BooleanValue teleport = new BooleanValue("Teleport", this, true);
private final BooleanValue velocity = new BooleanValue("Velocity", this, true);
private final BooleanValue abilities = new BooleanValue("Abilities", this, true);
private final BooleanValue displayAll = new BooleanValue("Display All", this, true);
private final BooleanValue blacklist = new BooleanValue("Blacklist", this, true, () -> !displayAll.getValue());
private final BooleanValue time = new BooleanValue("Time Since Move", this, true, () -> !displayAll.getValue());
private final BooleanValue devPanel = new BooleanValue("Dev Panel", this, false);
private final BooleanValue eventCalls = new BooleanValue("Event Calls", this, false);
private final DragValue position = new DragValue("", this, new Vector2d(200, 200), true);
private final DateTimeFormatter date = DateTimeFormatter.ofPattern("MM/dd/yyyy");
private final ArrayList<String> blacklisted = new ArrayList<>();
public static HashMap<String, Integer> calls = new HashMap<>();
private long threadLag;
private boolean measuring;
private StopWatch stopWatch = new StopWatch();
@Override
public void onEnable() {
blacklisted.clear();
}
@EventLink
public final Listener<PacketSendEvent> onPacketSend = event -> {
if (!Client.DEVELOPMENT_SWITCH) return;
final Packet<?> packet = event.getPacket();
if (packet instanceof C03PacketPlayer && teleport.getValue()) {
stopWatch.reset();
}
if (displayAll.getValue()) {
String name = packet.getClass().getSimpleName();
if (blacklist.getValue()) {
if (!blacklisted.contains(name)) {
ChatUtil.display(EnumChatFormatting.BLACK + " BlackListed Packet " + EnumChatFormatting.RESET + " (ID: %s)", name);
blacklisted.add(name);
}
} else if (!blacklisted.contains(name)) {
ChatUtil.display(EnumChatFormatting.GOLD + " Packet " + EnumChatFormatting.RESET + " (ID: %s)", name);
for (Field field : packet.getClass().getDeclaredFields()) {
field.setAccessible(true);
try {
ChatUtil.display(EnumChatFormatting.YELLOW + " %s:" + EnumChatFormatting.GRAY + " %s", field.getName(), field.get(packet));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
if (time.getValue()) ChatUtil.display(EnumChatFormatting.YELLOW + " %s:" + EnumChatFormatting.GRAY + " %s", "time since movement", stopWatch.getElapsedTime());
ChatUtil.display("");
}
}
};
@EventLink
public final Listener<PacketReceiveEvent> onPacketReceiveEvent = event -> {
final Packet<?> packet = event.getPacket();
if (transaction.getValue() && packet instanceof S32PacketConfirmTransaction) {
final S32PacketConfirmTransaction transaction = ((S32PacketConfirmTransaction) packet);
ChatUtil.display(EnumChatFormatting.RED + " Transaction " + EnumChatFormatting.RESET + " (ID: %s) (WindowID: %s)", transaction.actionNumber, transaction.windowId);
} else if (keepAlive.getValue() && packet instanceof S00PacketKeepAlive) {
final S00PacketKeepAlive wrapper = ((S00PacketKeepAlive) packet);
ChatUtil.display(EnumChatFormatting.GREEN + " Keep Alive " + EnumChatFormatting.RESET + " (ID: %s)", wrapper.func_149134_c());
} else if (teleport.getValue() && packet instanceof S08PacketPlayerPosLook) {
final S08PacketPlayerPosLook wrapper = ((S08PacketPlayerPosLook) packet);
ChatUtil.display(EnumChatFormatting.BLUE + " Server Teleport " + EnumChatFormatting.RESET + " (Position: %s)",
MathUtil.round(wrapper.x, 3) + " " +
MathUtil.round(wrapper.y, 3) + " " +
MathUtil.round(wrapper.z, 3));
} else if (velocity.getValue() && packet instanceof S12PacketEntityVelocity) {
final S12PacketEntityVelocity wrapper = ((S12PacketEntityVelocity) packet);
if (wrapper.getEntityID() == mc.thePlayer.getEntityId()) {
ChatUtil.display(EnumChatFormatting.LIGHT_PURPLE + " Velocity " + EnumChatFormatting.RESET + " (DeltaX: %s) (DeltaY: %s) (DeltaZ: %s) ",
wrapper.motionX / 8000D, wrapper.motionY / 8000D, wrapper.motionZ / 8000D);
}
} else if (velocity.getValue() && packet instanceof S27PacketExplosion) {
S27PacketExplosion explosion = ((S27PacketExplosion) packet);
ChatUtil.display(EnumChatFormatting.LIGHT_PURPLE + " Explosion (Velocity) " + EnumChatFormatting.RESET + " (DeltaX: %s) (DeltaY: %s) (DeltaZ: %s) ",
explosion.func_149149_c(), explosion.func_149144_d(), explosion.func_149147_e());
} else if (abilities.getValue() && packet instanceof S39PacketPlayerAbilities) {
S39PacketPlayerAbilities abilitiesp = ((S39PacketPlayerAbilities) packet);
ChatUtil.display(EnumChatFormatting.YELLOW + " Abilities " + abilitiesp.getFlySpeed() + " " + abilitiesp.isAllowFlying() + " " + abilitiesp.isFlying());
}
};
@EventLink
public final Listener<Render2DEvent> onRender2D = event -> {
if (devPanel.getValue()) {
double padding = 10;
position.scale = new Vector2d(180, 207);
getLayer(REGULAR, 1).add(() -> RenderUtil.roundedRectangle(position.position.x, position.position.y, position.scale.x, position.scale.y, getTheme().getRound(), getTheme().getBackgroundShade()));
getLayer(BLUR).add(() -> RenderUtil.roundedRectangle(position.position.x, position.position.y, position.scale.x, position.scale.y, getTheme().getRound(), Color.BLACK));
getLayer(BLOOM).add(() -> RenderUtil.roundedRectangle(position.position.x, position.position.y, position.scale.x, position.scale.y, getTheme().getRound(), getTheme().getDropShadow()));
getLayer(REGULAR, 1).add(() -> {
mc.fontRendererObj.drawWithShadow(Client.NAME + " " + Client.VERSION + " INDEV " + date.format(LocalDateTime.now()), position.position.x + padding, position.position.y + padding, new Color(255, 255, 0).getRGB());
mc.fontRendererObj.drawWithShadow("FPS: " + Minecraft.getDebugFPS() + " [target " + mc.getLimitFramerate() + "]", position.position.x + padding, position.position.y + padding * 2, new Color(255, 255, 0).getRGB());
mc.fontRendererObj.draw("Debugger", position.position.x + padding, position.position.y + padding * 4, getTheme().getFirstColor().hashCode());
if (Client.DEVELOPMENT_SWITCH) {
mc.fontRendererObj.draw("Blink: " + BlinkComponent.blinking, position.position.x + padding, position.position.y + padding * 6, Color.WHITE.hashCode());
} else {
mc.fontRendererObj.draw("Hidden due to not in dev mode", position.position.x + padding, position.position.y + padding * 5, Color.WHITE.hashCode());
mc.fontRendererObj.draw("Hidden due to not in dev mode", position.position.x + padding, position.position.y + padding * 6, Color.WHITE.hashCode());
}
// mc.fontRendererObj.drawString("Bot Amount: " + Client.INSTANCE.getBotManager().size(), position.position.x + padding, position.position.y + padding * 7, Color.WHITE.hashCode());
mc.fontRendererObj.draw("ESPs Amount: " + ESPComponent.esps.size(), position.position.x + padding, position.position.y + padding * 8, Color.WHITE.hashCode());
mc.fontRendererObj.draw("Performance", position.position.x + padding, position.position.y + padding * 9, getTheme().getFirstColor().hashCode());
mc.fontRendererObj.draw("ThreadLag: " + threadLag, position.position.x + padding, position.position.y + padding * 16, Color.WHITE.hashCode());
mc.fontRendererObj.draw("Other", position.position.x + padding, position.position.y + padding * 18, getTheme().getFirstColor().hashCode());
mc.fontRendererObj.draw("Timer: " + mc.timer.timerSpeed, position.position.x + padding, position.position.y + padding * 19, Color.WHITE.hashCode());
});
}
};
@EventLink
public final Listener<PreMotionEvent> onPreMotionEvent = event -> {
if (measuring) return;
long systemTime = System.currentTimeMillis();
measuring = true;
boolean run = mc.thePlayer.ticksExisted % 100 == 0 && eventCalls.getValue();
threadPool.execute(() -> {
threadLag = System.currentTimeMillis() - systemTime;
measuring = false;
if (run) {
ChatUtil.display("Displaying Calls: ");
for (String name : calls.keySet()) {
ChatUtil.display(name + ": " + calls.get(name));
}
calls.clear();
}
});
};
}
// NOTE (AI): The S27 branch is a narrow slice of a much larger diagnostic module that also logs transactions, keepalives, teleports and S12 velocity. The explosion branch prints the three motion floats via the func_1491xx accessors. Debugger is gated behind the module's own toggles, not the development switch, so it works in release builds.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.
// ===== FILE: LiquidSense Dev, net/ccbluex/liquidbounce/features/module/modules/exploit/PingSpoof.java =====
/*
* LiquidBounce Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
* https://github.com/CCBlueX/LiquidBounce/
*/
package net.ccbluex.liquidbounce.features.module.modules.exploit;
import net.ccbluex.liquidbounce.LiquidBounce;
import net.ccbluex.liquidbounce.event.*;
import net.ccbluex.liquidbounce.features.module.Module;
import net.ccbluex.liquidbounce.features.module.ModuleCategory;
import net.ccbluex.liquidbounce.features.module.ModuleInfo;
import net.ccbluex.liquidbounce.features.module.modules.movement.Fly;
import net.ccbluex.liquidbounce.utils.misc.RandomUtils;
import net.ccbluex.liquidbounce.utils.timer.TimeUtils;
import net.ccbluex.liquidbounce.value.IntegerValue;
import net.minecraft.network.Packet;
import net.minecraft.network.login.server.S00PacketDisconnect;
import net.minecraft.network.play.client.C00PacketKeepAlive;
import net.minecraft.network.play.client.C0CPacketInput;
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
import net.minecraft.network.play.client.C16PacketClientStatus;
import net.minecraft.network.play.server.S27PacketExplosion;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@ModuleInfo(name = "PingSpoof", description = "Spoofs your ping to a given value.", category = ModuleCategory.EXPLOIT)
public class PingSpoof extends Module {
private final IntegerValue maxDelayValue = new IntegerValue("MaxDelay", 1000, 0, 5000) {
@Override
protected void onChanged(final Integer oldValue, final Integer newValue) {
final int minDelayValue = PingSpoof.this.minDelayValue.get();
if(minDelayValue > newValue)
set(minDelayValue);
}
};
private final IntegerValue minDelayValue = new IntegerValue("MinDelay", 500, 0, 5000) {
@Override
protected void onChanged(final Integer oldValue, final Integer newValue) {
final int maxDelayValue = PingSpoof.this.maxDelayValue.get();
if(maxDelayValue < newValue)
set(maxDelayValue);
}
};
private final HashMap<Packet<?>, Long> packetsMap = new HashMap<>();
@Override
public void onDisable() {
packetsMap.clear();
}
@EventTarget
public void onPacket(final PacketEvent event) {
final Packet packet = event.getPacket();
if ((packet instanceof C0FPacketConfirmTransaction || packet instanceof C00PacketKeepAlive) && !(mc.thePlayer.isDead || mc.thePlayer.getHealth() <= 0) && !packetsMap.containsKey(packet)) {
synchronized(packetsMap) {
packetsMap.put(packet, System.currentTimeMillis() + TimeUtils.randomDelay(minDelayValue.get(), maxDelayValue.get()));
}
event.cancelEvent();
}
}
@EventTarget(ignoreCondition = true)
public void onUpdate(final UpdateEvent event) {
try {
synchronized(packetsMap) {
for(final Iterator<Map.Entry<Packet<?>, Long>> iterator = packetsMap.entrySet().iterator(); iterator.hasNext(); ) {
final Map.Entry<Packet<?>, Long> entry = iterator.next();
if(entry.getValue() < System.currentTimeMillis()) {
mc.getNetHandler().addToSendQueue(entry.getKey());
iterator.remove();
}
}
}
}catch(final Throwable t) {
t.printStackTrace();
}
}
}
// NOTE (AI): The S27PacketExplosion reference is import-only. PingSpoof 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. The import is dead scaffolding from the upstream LiquidBounce PingSpoof, which historically classified explosion packets; this dev build does not touch S27. It is documented for completeness, not because the module processes the packet.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).
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.
// ===== FILE: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/velocity/ExplosionHandler.java =====
package ac.grim.grimac.checks.impl.velocity;
import ac.grim.grimac.api.config.ConfigManager;
import ac.grim.grimac.api.storage.verbose.Verbose;
import ac.grim.grimac.checks.Check;
import ac.grim.grimac.checks.CheckData;
import ac.grim.grimac.checks.type.PacketSendListener;
import ac.grim.grimac.checks.type.PostPredictionListener;
import ac.grim.grimac.player.GrimPlayer;
import ac.grim.grimac.utils.anticheat.update.PredictionComplete;
import ac.grim.grimac.utils.data.VectorData;
import ac.grim.grimac.utils.data.VelocityData;
import ac.grim.grimac.utils.math.Vector3dm;
import com.github.retrooper.packetevents.PacketEvents;
import com.github.retrooper.packetevents.event.PacketSendEvent;
import com.github.retrooper.packetevents.manager.server.ServerVersion;
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
import com.github.retrooper.packetevents.protocol.world.states.WrappedBlockState;
import com.github.retrooper.packetevents.protocol.world.states.defaulttags.BlockTags;
import com.github.retrooper.packetevents.protocol.world.states.type.StateType;
import com.github.retrooper.packetevents.protocol.world.states.type.StateTypes;
import com.github.retrooper.packetevents.protocol.world.states.type.StateValue;
import com.github.retrooper.packetevents.util.Vector3d;
import com.github.retrooper.packetevents.util.Vector3i;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerExplosion;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Deque;
import java.util.LinkedList;
@CheckData(name = "AntiExplosion", stableKey = "grim.velocity.anti_explosion", configName = "Explosion", description = "Did not take the expected explosion knockback", setback = 10)
public class ExplosionHandler extends Check implements PacketSendListener, PostPredictionListener {
private static final Verbose V = Verbose.of("[ignored explosion|o: {offset}]");
private final Deque<VelocityData> firstBreadMap = new LinkedList<>();
private VelocityData lastExplosionsKnownTaken = null;
private VelocityData firstBreadAddedExplosion = null;
@Getter
private boolean explosionPointThree = false;
private double offsetToFlag;
public ExplosionHandler(GrimPlayer player) {
super(player);
}
@Override
public void onPacketSend(final PacketSendEvent event) {
if (event.getPacketType() == PacketType.Play.Server.EXPLOSION) {
WrapperPlayServerExplosion explosion = new WrapperPlayServerExplosion(event);
// Since 1.21.2, the server will instead send these changes via block change packets
final boolean hasBlocks = PacketEvents.getAPI().getServerManager().getVersion().isOlderThan(ServerVersion.V_1_21_2);
if (hasBlocks) {
this.handleBlockExplosions(explosion);
}
Vector3d velocity = explosion.getKnockback();
if (velocity != null && (velocity.x != 0 || velocity.y != 0 || velocity.z != 0)) {
// No need to spam transactions
if (!hasBlocks || explosion.getRecords().isEmpty()) player.sendTransaction();
addPlayerExplosion(player.lastTransactionSent.get(), velocity);
event.getTasksAfterSend().add(player::sendTransaction);
}
}
}
private void handleBlockExplosions(WrapperPlayServerExplosion explosion) {
final @Nullable WrapperPlayServerExplosion.BlockInteraction blockInteraction = explosion.getBlockInteraction();
final boolean shouldDestroy = blockInteraction != WrapperPlayServerExplosion.BlockInteraction.KEEP_BLOCKS;
if (explosion.getRecords().isEmpty() || !shouldDestroy) {
return;
}
player.sendTransaction();
player.latencyUtils.addRealTimeTask(player.lastTransactionSent.get(), () -> {
for (Vector3i record : explosion.getRecords()) {
// Null OR not flip redstone blocks, then set to air
if (blockInteraction != WrapperPlayServerExplosion.BlockInteraction.TRIGGER_BLOCKS) {
player.compensatedWorld.updateBlock(record.x, record.y, record.z, 0);
} else {
// We need to flip redstone blocks, or do special things with other blocks
final WrappedBlockState state = player.compensatedWorld.getBlock(record);
final StateType type = state.getType();
if (BlockTags.CANDLES.contains(type) || BlockTags.CANDLE_CAKES.contains(type)) {
state.setLit(false);
continue;
} else if (type == StateTypes.BELL) {
// Does this affect anything? I don't know, I don't see anything that relies on whether a bell is ringing.
continue;
}
// Otherwise try and flip/open it.
final boolean canFlip = state.hasProperty(StateValue.POWERED) && !state.isPowered() || type == StateTypes.LEVER;
if (canFlip) {
player.compensatedWorld.tickOpenable(record.x, record.y, record.z);
}
}
}
});
}
public VelocityData getFutureExplosion() {
// Chronologically in the future
if (!firstBreadMap.isEmpty()) {
return firstBreadMap.peek();
}
// Less in the future
if (lastExplosionsKnownTaken != null) {
return lastExplosionsKnownTaken;
}
// Uncertain, might be in the future
if (player.firstBreadExplosion != null && player.likelyExplosions == null) {
return player.firstBreadExplosion;
} else if (player.likelyExplosions != null) { // Known to be in the present
return player.likelyExplosions;
}
return null;
}
public boolean shouldIgnoreForPrediction(VectorData data) {
if (data.isExplosion() && data.isFirstBreadExplosion()) {
return player.firstBreadExplosion.offset > offsetToFlag;
}
return false;
}
public boolean wouldFlag() {
return (player.likelyExplosions != null && player.likelyExplosions.offset > offsetToFlag) || (player.firstBreadExplosion != null && player.firstBreadExplosion.offset > offsetToFlag);
}
public void addPlayerExplosion(int breadOne, Vector3d explosion) {
firstBreadMap.add(new VelocityData(-1, breadOne, player.getSetbackTeleportUtil().isSendingSetback, new Vector3dm(explosion.getX(), explosion.getY(), explosion.getZ())));
}
public void setPointThree(boolean isPointThree) {
explosionPointThree = explosionPointThree || isPointThree;
}
public void handlePredictionAnalysis(double offset) {
if (player.firstBreadExplosion != null) {
player.firstBreadExplosion.offset = Math.min(player.firstBreadExplosion.offset, offset);
}
if (player.likelyExplosions != null) {
player.likelyExplosions.offset = Math.min(player.likelyExplosions.offset, offset);
}
}
public void forceExempt() {
// Unsure explosion was taken
if (player.firstBreadExplosion != null) {
player.firstBreadExplosion.offset = 0;
}
if (player.likelyExplosions != null) {
player.likelyExplosions.offset = 0;
}
}
@Override
public void onPredictionComplete(final PredictionComplete predictionComplete) {
double offset = predictionComplete.getOffset();
boolean wasZero = explosionPointThree;
explosionPointThree = false;
if (player.likelyExplosions == null && player.firstBreadExplosion == null) {
firstBreadAddedExplosion = null;
return;
}
// We must check to see if knockback has overridden this explosion
// (Yes, I could make this very simple and exempt on kb, but that allows people to ignore most explosions)
//
// We do this by finding the minimum explosion transaction that could have been overridden
// We then compare this against the maximum velocity transaction that could override
//
// If velocity is over transaction, exempt
int minTrans = Math.min(player.likelyExplosions != null ? player.likelyExplosions.transaction : Integer.MAX_VALUE,
player.firstBreadExplosion != null ? player.firstBreadExplosion.transaction : Integer.MAX_VALUE);
int kbTrans = Math.max(player.likelyKB != null ? player.likelyKB.transaction : Integer.MIN_VALUE,
player.firstBreadKB != null ? player.firstBreadKB.transaction : Integer.MIN_VALUE);
if (player.predictedVelocity.isFirstBreadExplosion()) {
firstBreadAddedExplosion = null;
firstBreadMap.poll(); // Remove from map so we don't pull it again
}
if (wasZero || player.predictedVelocity.isExplosion() ||
(minTrans < kbTrans)) {
// Unsure knockback was taken
if (player.firstBreadExplosion != null) {
player.firstBreadExplosion.offset = Math.min(player.firstBreadExplosion.offset, offset);
}
if (player.likelyExplosions != null) {
player.likelyExplosions.offset = Math.min(player.likelyExplosions.offset, offset);
}
}
// 100% known kb was taken
if (player.likelyExplosions != null && !player.compensatedEntities.self.isDead) {
if (player.likelyExplosions.offset > offsetToFlag) {
boolean ignored = player.likelyExplosions.offset == Integer.MAX_VALUE;
flagWithSetback(V.write(verbose()).bool(ignored).f64(offset));
} else {
reward();
}
}
}
public VelocityData getPossibleExplosions(int lastTransaction, boolean isJustTesting) {
handleTransactionPacket(lastTransaction);
if (lastExplosionsKnownTaken == null)
return null;
VelocityData returnLastExplosion = lastExplosionsKnownTaken;
if (!isJustTesting) {
lastExplosionsKnownTaken = null;
}
return returnLastExplosion;
}
private void handleTransactionPacket(int transactionID) {
VelocityData data = firstBreadMap.peek();
while (data != null) {
if (data.transaction == transactionID) { // First bread explosion
if (lastExplosionsKnownTaken != null)
firstBreadAddedExplosion = new VelocityData(-1, data.transaction, data.isSetback, lastExplosionsKnownTaken.vector.clone().add(data.vector));
else
firstBreadAddedExplosion = new VelocityData(-1, data.transaction, data.isSetback, data.vector);
break; // All knockback after this will have not been applied
} else if (data.transaction < transactionID) {
if (lastExplosionsKnownTaken != null) {
lastExplosionsKnownTaken.vector.add(data.vector);
} else {
lastExplosionsKnownTaken = new VelocityData(-1, data.transaction, data.isSetback, data.vector);
}
// Explosion has been applied and is now required, remove it from first bread
firstBreadAddedExplosion = null;
firstBreadMap.poll();
data = firstBreadMap.peek();
} else { // We are too far ahead in the future
break;
}
}
}
public VelocityData getFirstBreadAddedExplosion(int lastTransaction) {
handleTransactionPacket(lastTransaction);
return firstBreadAddedExplosion;
}
@Override
public void onReload(@NotNull ConfigManager config) {
offsetToFlag = config.getDoubleElse("Explosion.threshold", 0.00001);
}
}
// NOTE (AI): The knockback-vs-explosion override logic uses transaction ids, so a simultaneous knockback that legitimately replaces the explosion does not false-flag.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.
// ===== FILE: Updated-NoCheatPlus-NoCheatPlus, NCPCompatProtocolLib/src/main/java/fr/neatmonster/nocheatplus/checks/net/protocollib/VelocityAdapter.java =====
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.neatmonster.nocheatplus.checks.net.protocollib;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.events.ListenerPriority;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.reflect.StructureModifier;
import fr.neatmonster.nocheatplus.checks.CheckType;
import fr.neatmonster.nocheatplus.checks.moving.MovingConfig;
import fr.neatmonster.nocheatplus.checks.moving.MovingData;
import fr.neatmonster.nocheatplus.checks.moving.velocity.VelocityFlags;
import fr.neatmonster.nocheatplus.players.DataManager;
import fr.neatmonster.nocheatplus.players.IPlayerData;
/**
* Adapter for handling the explosion packet (for velocity)
*/
public class VelocityAdapter extends BaseAdapter {
private static PacketType[] initPacketTypes() {
final List<PacketType> types = new LinkedList<PacketType>(Arrays.asList(
PacketType.Play.Server.EXPLOSION
//PacketType.Play.Server.ENTITY_VELOCITY
));
return types.toArray(new PacketType[types.size()]);
}
public VelocityAdapter(Plugin plugin) {
super(plugin, ListenerPriority.MONITOR, initPacketTypes());
}
@Override
public void onPacketSending(final PacketEvent event) {
handleVelocityPacket(event);
}
private void handleVelocityPacket(PacketEvent event) {
try {
if (event.isPlayerTemporary()) return;
}
catch (NoSuchMethodError e) {
if (event.getPlayer() == null) {
counters.add(ProtocolLibComponent.idNullPlayer, 1);
return;
}
if (DataManager.getPlayerDataSafe(event.getPlayer()) == null) {
return;
}
}
if (event.getPacketType() != PacketType.Play.Server.EXPLOSION) return;
final Player player = event.getPlayer();
final PacketContainer packet = event.getPacket();
final StructureModifier<Float> floats = packet.getFloat();
if (floats.size() != 4) {
// TODO : Warning
return;
}
//final Float strength = floats.read(0);
final Float velX = floats.read(1);
final Float velY = floats.read(2);
final Float velZ = floats.read(3);
if (Math.abs(velX) == 0.0 && Math.abs(velZ) == 0.0 && Math.abs(velY) == 0.0) return;
final IPlayerData pData = DataManager.getPlayerData(player);
if (!pData.isCheckActive(CheckType.MOVING, player)) return;
final MovingData data = pData.getGenericInstance(MovingData.class);
final MovingConfig cc = pData.getGenericInstance(MovingConfig.class);
// Process velocity.
data.addVelocity(player, cc, velX, velY, velZ, VelocityFlags.ORIGIN_EXPLOSION | VelocityFlags.ADDITIVE);
}
}
// NOTE (AI): The adapter's entity-velocity registration is commented out, so S27 is the only packet it processes.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.
// ===== FILE: intave-intave, src/main/java/de/jpx3/intave/packet/reader/ExplosionReader.java =====
/*
* Copyright 2026 Intave
*
* This software is licensed under the PolyForm Perimeter License 1.0.0.
* You may use this software for any purpose, except for providing to
* others any product that competes with the software.
*
* A copy of the license is available at:
* https://polyformproject.org/licenses/perimeter/1.0.0/
*/
package de.jpx3.intave.packet.reader;
import com.comphenix.protocol.reflect.EquivalentConverter;
import com.comphenix.protocol.reflect.StructureModifier;
import com.comphenix.protocol.wrappers.BukkitConverters;
import de.jpx3.intave.adapter.MinecraftVersions;
import de.jpx3.intave.share.Motion;
import org.bukkit.util.Vector;
import java.util.Optional;
public final class ExplosionReader extends AbstractPacketReader {
private final static boolean NEW_EXPLOSION = MinecraftVersions.VER1_21_3.atOrAbove();
private final static EquivalentConverter<Vector> vectorConverter =
NEW_EXPLOSION ? BukkitConverters.getVectorConverter() : null;
public Motion motion() {
if (NEW_EXPLOSION) {
Optional<Vector> read = packet().getOptionals(vectorConverter).read(0);
if (read.isPresent()) {
Vector vector = read.get();
return new Motion(vector.getX(), vector.getY(), vector.getZ());
} else {
return null;
}
} else {
StructureModifier<Float> floats = packet().getFloat();
double motionX = floats.readSafely(1);
double motionY = floats.readSafely(2);
double motionZ = floats.readSafely(3);
return new Motion(motionX, motionY, motionZ);
}
}
public void setMotion(Motion motion) {
if (NEW_EXPLOSION) {
packet().getOptionals(vectorConverter).write(0, Optional.of(new Vector(motion.motionX(), motion.motionY(), motion.motionZ())));
} else {
StructureModifier<Float> floats = packet().getFloat();
floats.writeSafely(1, (float) motion.motionX());
floats.writeSafely(2, (float) motion.motionY());
floats.writeSafely(3, (float) motion.motionZ());
}
}
}
// NOTE (AI): The reader hides the 1.21.3 protocol change (optional vector vs three floats) behind one Motion type.Related Packets
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
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.
Module Analyses Using S27PacketExplosion
Full source walkthroughs of the modules and anti-cheats that use this packet.