0x08 S08PacketPlayerPosLook
Forces the player to a specific position and rotation. The client must respond with a C04/05/06.
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| x | double | Absolute X coordinate |
| y | double | Feet Y coordinate |
| z | double | Absolute Z coordinate |
| yaw | float | Absolute yaw rotation |
| pitch | float | Absolute pitch rotation |
| flags | byte bitmask | 0x01=relativeX, 0x02=relativeY, 0x04=relativeZ, 0x08=relativeYaw, 0x10=relativePitch |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| X | double | |
| Y | double | |
| Z | double | |
| Yaw | float | |
| Pitch | float | |
| Flags | byte | Bitmask for relative fields |
MCP References
NetHandlerPlayClient.handlePlayerPosLook()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 | |
| 148 | |
| 149 | |
Deobfuscated MCP 1.8.9 source of S08PacketPlayerPosLook, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S08PacketPlayerPosLook.java) at build time and verified present.
Deep Dive
Role in the protocol
S08 is the server's authoritative position and rotation correction: three doubles, two floats and a byte bitmask of relative flags (0x01 X, 0x02 Y, 0x04 Z, 0x08 Y_ROT, 0x10 X_ROT). It fires on join, dimension change, /tp-style teleports and anti-cheat lag-backs, and the client must answer with a C06PacketPlayerPosLook confirm or the server keeps its own position and re-sends. It is the most-intercepted clientbound packet in the corpus: every movement exploit family reads it, and several non-movement modules use it as a state signal (spawned, flagged, respawned).
Vanilla handling
NetHandlerPlayClient.handlePlayerPosLook (Memeware copy, line 601) checks PacketThreadUtil, adds each absolute field to the current value when the matching relative flag is set, calls setPosition, then immediately replies C06PacketPlayerPosLook using the bounding-box minY as the feet position. The motion zeroing lines are commented out in the Memeware and Nekoware copies, a decompile artifact of the 1.5.2-era base. The first S08 flips doneLoadingTerrain, which is the spawned signal Memeware's Stealer waits for to clear its chest state.
Why clients touch it
Five families. Flight modes cancel S08 to avoid being snapped back and re-send a confirm that matches the spoofed position (Rise MineLandFlight, CreativeFlight; Sigma Fly; Spicy Fly and BackupFly; Tenacity FlightModule). Speed modules treat S08 as a flag and auto-disable or cancel per-mode (Memeware and Nekoware Flag Check, Rise 5.99 Speed Zonecraft and Vulcan2). Rotation strippers rewrite yaw and pitch before the vanilla handler runs (Rise 5.99 NoRot and Freelook, Sigma NoRotate). Phase and Blink count or suppress teleports (Rise VulcanPhase, Sigma Phase and Blink, Spicy Phase). AntiVoid and Disabler suites use S08 as a timing trigger (Spicy AntiVoid, Rise VerusCustomDisabler and WatchdogDisabler, Sigma Disabler, Tenacity DisablerModule, Memeware Disabler Sloth mode). Sigma AntiVelocity even rewrites S08 rotations in AACFlag mode while hurtResistantTime is active. The two new clients fit the same landscape: November's PhaseModule reads S08 as its setback timer, LiquidSense's LagBack auto-disables movement modules on S08, and Tp and TeleportCommand use the teleport as their arm signal.
Exploit surface
The anti-cheat's blunt instrument is the rubberband: any server-side position desync ends in an S08. Clients fight it three ways: cancel the packet and re-send a spoofed C06 (keeps the client position, desyncs the server), accept the position but strip rotations (NoRotate), or ignore S08 only while a module state machine is armed (VulcanPhase counts teleports and then stands down after four). Rise 6.x TeleportCheck sits on the same packet to detect teleport exploits aimed at its own users. Every anti-cheat measures the C06 echo: the confirm must match the teleported coordinates, which is why cancel-and-spoof is only viable when the module replays the exact S08 position and why repeated cancels read as teleport-spam flags.
Server-Side Handling
NetHandlerPlayServer.setPlayerLocation (Spicy and Tenacity copies, line 448) computes the absolute target, adds the relative offsets when flags are set, zeroes the player's motion and sends S08. processPlayer validates incoming C0x movement against the last sent position and re-sends S08 when the client drifts beyond tolerance, which is the rubberband. Vanilla 1.8.9 has no teleport-id counter, so the server trusts the next C06-style confirm and re-sends S08 only when subsequent movement disagrees; that gap is exactly what cancel-and-confirm spoofing exploits.
Protocol Analysis
Wire order: x, y, z doubles, yaw, pitch floats, then one flags byte read via readUnsignedByte. Flagged fields are deltas added to the current client value, so the server can nudge a player with a partial teleport; the join S08 is absolute (empty flag set). The client replies with C06PacketPlayerPosLook (absolute position, bounding-box minY, current rotations, onGround flag) regardless of which fields were relative. Because the reply uses the client's post-processing position, any module that mutates the packet before the handler runs changes what the server records.
Anti-Cheat Landscape
S08 is where lag-back lands: speed, phase, ground and fly checks all terminate in one. Cancelling S08 without echoing the position forces the server into a re-send loop that is itself visible as teleport spam. The stealthy pattern is to accept the position and neutralize the effect: NoRotate rewrites rotation so the confirm matches while aim stays client-side, and disablers re-arm PingSpoofComponent immediately after S08 (Rise VerusCustomDisabler sets disable = -20 on every teleport and only spoofs once the position history is clean). Hypixel-era flight modes cancel S08 only until the server velocity-confirms the fall, then let the teleport through to avoid a permanent desync flag.
implementation Implementation Cases
The server's authoritative position correction: doubles plus floats plus a relative-flag bitmask, answered by a mandatory C06 confirm. The most-modded clientbound packet in the corpus: Flight cancels it, Speed treats it as a flag, NoRotate strips rotation, Phase counts it, AntiVoid uses it to time its rescue, and the disabler suites use it to re-arm ping-spoof and blink state.
Keep a spoofed airborne position by cancelling S08 teleports until the server confirms the fall, then accept the snap-back and slow the game clock.
On PacketReceiveEvent, cancel S08 while the module has not been teleport-confirmed; keep broadcasting C03 packets and pin the client position to the launch point. The confirm is the S12 velocity packet: once motionY passes a threshold, teleported flips true, S08 is let through and timerSpeed drops to 0.3.
// ===== FILE: Rise 6.1.30, com/alan/clients/module/impl/movement/flight/MineLandFlight.java =====
package com.alan.clients.module.impl.movement.flight;
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.module.impl.movement.Flight;
import com.alan.clients.util.packet.PacketUtil;
import com.alan.clients.util.player.MoveUtil;
import com.alan.clients.value.Mode;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import net.minecraft.network.play.server.S12PacketEntityVelocity;
import net.minecraft.util.MathHelper;
public class MineLandFlight extends Mode<Flight> {
private double serverPosX, serverPosY, serverPosZ;
private boolean teleported;
public MineLandFlight(String name, Flight parent) {
super(name, parent);
}
@Override
public void onEnable() {
serverPosX = mc.thePlayer.posX;
serverPosY = mc.thePlayer.posY;
serverPosZ = mc.thePlayer.posZ;
teleported = false;
}
@EventLink
public final Listener<PreMotionEvent> onPreMotionEvent = event -> {
if (!teleported) {
final double yaw = MoveUtil.direction();
final double speed = 6;
if (mc.thePlayer.ticksExisted % 3 == 0) {
PacketUtil.send(new C03PacketPlayer(mc.thePlayer.onGround));
mc.thePlayer.setPosition(serverPosX, serverPosY, serverPosZ);
}
event.setPosY(event.getPosY() - 1.1 + (mc.thePlayer.ticksExisted % 3 == 0 ? 0.42f : 0));
event.setPosX(event.getPosX() + MathHelper.sin((float) yaw) * speed);
event.setPosZ(event.getPosZ() - MathHelper.cos((float) yaw) * speed);
} else {
mc.timer.timerSpeed = 0.3f;
}
};
@EventLink
public final Listener<PacketReceiveEvent> onPacketReceiveEvent = event -> {
final Packet<?> packet = event.getPacket();
if (packet instanceof S08PacketPlayerPosLook && !teleported) {
event.setCancelled();
} else if (packet instanceof S12PacketEntityVelocity) {
final S12PacketEntityVelocity wrapper = (S12PacketEntityVelocity) packet;
if (wrapper.getEntityID() == mc.thePlayer.getEntityId() && wrapper.motionY / 8000D > 0.5) {
teleported = true;
}
}
};
}
// NOTE (AI): Mode of the Rise 6.x Flight module tuned for the MineLand server family. The S08 handler cancels every teleport while teleported is false, so the spoofed position stream from PreMotion (posY dropped 1.1, 6 blocks per tick forward) is never snapped back. The teleport is only accepted once the server confirms the fall through an S12 velocity packet with motionY / 8000D > 0.5, after which timerSpeed drops to 0.3. This cancel-then-accept pattern is the canonical S08 ground-spoof: cancel rubberbands while airborne, let the teleport through the moment the server has committed to the new position. The C03 broadcast every 3 ticks with setPosition back to serverPos pins the server-side bounding box at the launch point.Treat S08 as a lag-back flag and disable the module, or cancel the teleport per server mode so the speed boost survives.
Memeware and Nekoware hook PacketInEvent: if the packet is S08 and the Flag Check setting is on, print a chat message and toggle the module off. Rise 5.99 Speed runs per-mode handlers: Zonecraft cancels S08 and re-sends C04, Vulcan2 cancels teleports inside 10 blocks, Hypixel2 cancels once, Minemenclub Hop resets its balance counter.
// ===== FILE: Memeware 7.3, me/memewaredevs/client/module/movement/Speed.java =====
/*
* Decompiled with CFR 0.145.
*
* Could not load the following classes:
* org.apache.commons.lang3.RandomUtils
*/
package me.memewaredevs.client.module.movement;
import me.hippo.api.lwjeb.annotation.Handler;
import me.memewaredevs.client.event.events.MovementEvent;
import me.memewaredevs.client.event.events.PacketInEvent;
import me.memewaredevs.client.event.events.UpdateEvent;
import me.memewaredevs.client.module.Module;
import me.memewaredevs.client.util.ChatUtil;
import me.memewaredevs.client.util.CubeUtil;
import me.memewaredevs.client.util.blocks.misc.BlockUtil;
import me.memewaredevs.client.util.movement.DynamicFriction;
import me.memewaredevs.client.util.movement.MovementUtils;
import me.memewaredevs.client.util.packet.PacketUtil;
import net.minecraft.network.play.client.C09PacketHeldItemChange;
import net.minecraft.network.play.client.C18PacketSpectate;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import org.apache.commons.lang3.RandomUtils;
import java.util.function.Consumer;
public class Speed extends Module {
private DynamicFriction dynamicNCPFriction = new DynamicFriction();
private double speed, currentDistance, lastDistance;
public boolean prevOnGround;
public Speed() {
super("Speed", 33, Module.Category.MOVEMENT);
addModes("Vanilla", "PvPTemple", "Mineplex", "Mineplex2", "Cubecraft Slow", "NCP Fast", "Cubecraft Fast", "Hypixel");
addBoolean("Flag Check", true);
addDouble("Vanilla", "Speed", 0.47, 0.25, 5);
}
@Handler
public Consumer<PacketInEvent> eventConsumer0 = (event) -> {
if (event.getPacket() instanceof S08PacketPlayerPosLook && getBool("Flag Check")) {
if (mc.thePlayer != null && mc.theWorld != null) {
ChatUtil.printChat("Speed disabled because you flagged/got teleported!");
toggle();
}
}
};
@Handler
public Consumer<MovementEvent> eventConsumer1 = (event) -> {
if (isMode("Mineplex2")) {
if (airSlot() == -10){
return;
}
if (mc.thePlayer.ticksExisted % 3 == 0 && mc.thePlayer.isMovingOnGround()) {
PacketUtil.sendPacketSilent(new C09PacketHeldItemChange(Speed.airSlot()));
BlockUtil.placeHeldItemUnderPlayer();
speed += 0.125F;
}
else {
PacketUtil.sendPacketSilent(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem));
speed *= 0.98;
}
if (speed > 1.24) {
speed = 1.24;
}
MovementUtils.setMoveSpeed(event, speed);
}
if (isMode("PvPTemple")) {
if (mc.thePlayer.isMovingOnGround()) {
event.setY(mc.thePlayer.motionY = 0.42F);
speed = 0.5;
prevOnGround = true;
}
else if (prevOnGround) {
speed = 0.8;
prevOnGround = false;
}
else {
speed *= 0.932;
}
MovementUtils.setMoveSpeed(event, speed);
}
if (isMode("Vanilla")) {
double max = this.getDouble("Vanilla", "Speed");
MovementUtils.setMoveSpeed(event, max);
}
if (isMode("Cubecraft Slow")) {
PacketUtil.sendPacketSilent(new C18PacketSpectate(CubeUtil.CUBECRAFT_UUID));
mc.gameSettings.keyBindJump.pressed = false;
if (mc.thePlayer.ticksExisted % 4 == 0) {
MovementUtils.setMoveSpeed(event, MovementUtils.getBaseMoveSpeed() + 1.276444466666);
}
else {
MovementUtils.setMoveSpeed(event, MovementUtils.getBaseMoveSpeed() + 1.0E-12);
}
}
if (isMode("Cubecraft Fast")) {
mc.gameSettings.keyBindJump.pressed = false;
mc.thePlayer.cameraYaw = 0;
if(mc.thePlayer.ticksExisted % 4 == 0)
MovementUtils.setMoveSpeed(event, MovementUtils.getBaseMoveSpeed() + 1.55522225D);
else
MovementUtils.setMoveSpeed(event, MovementUtils.getBaseMoveSpeed());
if (mc.thePlayer.isMoving() && mc.thePlayer.onGround && mc.thePlayer.ticksExisted % 4 == 0)
mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.0922222333D * RandomUtils.nextDouble(0.75D, 1D), mc.thePlayer.posZ);
if(mc.thePlayer.ticksExisted % 8 == 0)
MovementUtils.offsetXZ(0.12115522522);
}
if (isMode("Mineplex")) {
mc.timer.timerSpeed = 1.0F;
if (mc.thePlayer.isMovingOnGround()) {
mc.timer.timerSpeed = 1F;
event.setY(mc.thePlayer.motionY = 0.4F);
prevOnGround = true;
currentDistance = speed;
speed = 0;
} else {
mc.timer.timerSpeed = 1.0F;
if (prevOnGround) {
speed = currentDistance + 0.56F;
prevOnGround = false;
} else {
speed = lastDistance * (speed > 2.2 ? 0.975 : speed >= 1.5 ? 0.98 : 0.985);
}
}
double max = this.getDouble("Vanilla", "Speed");
MovementUtils.setMoveSpeed(event, Math.max(Math.min(speed, max), prevOnGround ? 0 : 0.42));
}
if (isMode("Vanilla")) {
MovementUtils.setMoveSpeed(event, getDouble("Vanilla", "Speed"));
}
if (isMode("Hypixel")) {
mc.timer.timerSpeed = 1F;
if(mc.thePlayer.isMovingOnGround()) {
mc.timer.timerSpeed = 1.25F;
event.setY(mc.thePlayer.motionY = 0.3999175222222555F);
speed = MovementUtils.getBaseMoveSpeed() * 2.1492287832;
prevOnGround = true;
}
else {
if (prevOnGround) {
speed -= 0.66333332222 * (speed - MovementUtils.getBaseMoveSpeed());
prevOnGround = false;
}
else {
speed -= speed / 160 - 1.0E-9;
}
}
MovementUtils.setMoveSpeed(event, speed);
}
if (isMode("NCP Fast")) {
this.dynamicNCPFriction.updateFriction(event, 0.3928999999, 1.14999, 159, 0.66);
}
};
@Handler
public Consumer<UpdateEvent> eventConsumer2 = (event) -> {
if (event.isPre()) {
if (isMode("Hypixel")) {
event.setY(event.getY() + 1.73E-11D);
}
double x = mc.thePlayer.posX - mc.thePlayer.prevPosX;
double z = mc.thePlayer.posZ - mc.thePlayer.prevPosZ;
this.lastDistance = Math.hypot(x, z);
}
};
public static int airSlot() {
for (int j = 0; j < 8; ++j) {
if (mc.thePlayer.inventory.mainInventory[j] == null) {
return j;
}
}
ChatUtil.printChat("Clear a hotbar slot.");
return -10;
}
@Override
public void onEnable() {
speed = 0;
prevOnGround = true;
lastDistance = 0;
}
@Override
public void onDisable() {
if (isMode("Mineplex2")) {
PacketUtil.sendPacketSilent(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem));
}
mc.thePlayer.jumpMovementFactor = 0.0F;
MovementUtils.setMoveSpeed(0);
mc.timer.timerSpeed = 1.0F;
if (isMode("Cubecraft Fast") || isMode("Cubecraft Slow")) {
mc.thePlayer.motionY = 0F;
mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.2664444, mc.thePlayer.posZ);
}
}
}
// NOTE (AI): The S08 hook is the Flag Check: any S08PacketPlayerPosLook while the setting is enabled is treated as a lag-back and the module toggles itself off with a chat message. This is the crude version of what Rise 5.99 Speed does per-mode (Zonecraft cancels S08 and re-sends C04, Vulcan2 cancels teleports inside 10 blocks, Hypixel2 cancels once, Minemenclub Hop resets its balance counter) and of Tenacity's auto-disable pattern. Nekoware v1 ships the identical Speed.java with the same Flag Check. The CFR decompiler header shows the 1.5.2-era codebase carried into 7.3; the Mineplex2 mode also abuses C09PacketHeldItemChange to place blocks under the player while running.Use S08 as the trigger to re-arm spoofing windows, strip rotations, or nudge the teleport position to break server-side state checks.
Rise 6.x VerusCustomDisabler sets disable = -20 on every S08 and re-arms PingSpoofComponent.spoof only after the position history is clean, holding C00 and C0F for 9 seconds. Memeware Disabler in Sloth mode adds 1.0E-4 to the S08 y to trip a spigot PlayerData nulling bug. Sigma Disabler rewrites S08 yaw and pitch and toggles itself off after the Hypixel watchdog window.
// ===== FILE: Rise 6.1.30, com/alan/clients/module/impl/exploit/disabler/VerusCustomDisabler.java =====
package com.alan.clients.module.impl.exploit.disabler;
import com.alan.clients.component.impl.player.PingSpoofComponent;
import com.alan.clients.component.impl.render.NotificationComponent;
import com.alan.clients.event.Listener;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.motion.PostStrafeEvent;
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.module.impl.exploit.Disabler;
import com.alan.clients.module.impl.movement.Flight;
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 net.minecraft.network.Packet;
import net.minecraft.network.play.client.C0BPacketEntityAction;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
public class VerusCustomDisabler extends Mode<Disabler> {
private final BooleanValue movementDisabler = new BooleanValue("Movement", this, false);
private final BooleanValue sprintDisabler = new BooleanValue("Sprint", this, false);
private Flight flight = null;
private Speed speed = null;
private int disable;
public VerusCustomDisabler(String name, Disabler parent) {
super(name, parent);
}
@EventLink
public final Listener<PreMotionEvent> onPreMotionEvent = event -> {
if (sprintDisabler.getValue() && MoveUtil.isMoving() && mc.thePlayer.ticksExisted > 50) {
if (mc.thePlayer.ticksExisted % 5 == 0) {
if (mc.thePlayer.ticksExisted % 10 == 0) {
PacketUtil.sendNoEvent(new C0BPacketEntityAction(mc.thePlayer,
C0BPacketEntityAction.Action.START_SPRINTING));
} else {
PacketUtil.sendNoEvent(new C0BPacketEntityAction(mc.thePlayer,
C0BPacketEntityAction.Action.STOP_SPRINTING));
}
}
}
};
@EventLink
public final Listener<PacketReceiveEvent> onPacketReceive = event -> {
Packet<?> packet = event.getPacket();
if (packet instanceof S08PacketPlayerPosLook) {
S08PacketPlayerPosLook posLook = ((S08PacketPlayerPosLook) packet);
disable = -20;
}
};
@EventLink
public final Listener<PostStrafeEvent> onPostStrafeEvent = event -> {
if (movementDisabler.getValue()) {
int time = 9;
disable++;
if (mc.thePlayer.ticksExisted > time * 20 && disable > 0) {
PingSpoofComponent.spoof(time * 1000, true, false, true, false);
}
if (mc.thePlayer.ticksSincePlayerVelocity > 20 * (time) || disable <= 0 || mc.thePlayer.ticksExisted <= time * 2 * 20) {
if (speed == null) {
speed = getModule(Speed.class);
}
if (speed.isEnabled()) {
speed.toggle();
MoveUtil.stop();
NotificationComponent.post("Auto Toggle", "Automatically disabled Speed to prevent flags", 1000);
}
}
if (mc.thePlayer.ticksSincePlayerVelocity > 20 * (time / 2) || disable <= 0 || mc.thePlayer.ticksExisted <= time * 2 * 20) {
if (flight == null) {
flight = getModule(Flight.class);
}
if (flight.isEnabled()) {
flight.toggle();
NotificationComponent.post("Auto Toggle", "Automatically disabled Flight to prevent flags", 1000);
}
}
}
};
@EventLink
public final Listener<PacketSendEvent> onPacketSend = event -> {
final Packet<?> packet = event.getPacket();
if (sprintDisabler.getValue() && packet instanceof C0BPacketEntityAction) {
C0BPacketEntityAction c0b = ((C0BPacketEntityAction) packet);
if (c0b.getAction() == C0BPacketEntityAction.Action.START_SPRINTING ||
c0b.getAction() == C0BPacketEntityAction.Action.STOP_SPRINTING) {
event.setCancelled();
}
}
};
}
// NOTE (AI): S08 is the re-arm trigger: every teleport sets disable = -20, which suppresses the PingSpoofComponent re-arm for 20 post-strafe events. The disabler only starts spoofing once the position history is clean (disable > 0 and ticksSincePlayerVelocity past 9 seconds), then holds C00/C0F for 9 seconds so Verus sees a frozen position window. The movement disabler auto-toggles Speed and Flight if the server keeps applying velocity, which is the S08-means-flag family pattern seen in Memeware Speed and Tenacity. The sprint disabler cancels C0B sprint toggles and re-emits them on a 5-tick cycle via PacketUtil.sendNoEvent, bypassing the event bus.Prevent servers from forcing the player's rotation: overwrite the S08 yaw and pitch with the client's current values before the vanilla handler applies them.
Rise 5.99 NoRot stores the server rotation and overwrites the packet fields per mode: Vanilla replaces both fields, Delay replays the saved rotation on the next PreMotion, Legit applies it only if the mouse has not moved since. Sigma 4.11 NoRotate does the same unconditionally on incoming S08.
// ===== FILE: Rise 5.99, dev/rise/module/impl/other/NoRot.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.other;
import dev.rise.event.impl.motion.PreMotionEvent;
import dev.rise.event.impl.packet.PacketReceiveEvent;
import dev.rise.module.Module;
import dev.rise.module.api.ModuleInfo;
import dev.rise.module.enums.Category;
import dev.rise.setting.impl.ModeSetting;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
@ModuleInfo(name = "NoRot", description = "Prevents servers from modifying your rotation", category = Category.OTHER)
public final class NoRot extends Module {
private final ModeSetting mode = new ModeSetting("Mode", this, "Vanilla", "Vanilla", "Packet", "Delay", "Legit", "Edit", "Hypixel");
private Float yaw, pitch;
private Float startingYaw, startingPitch;
@Override
public void onPacketReceive(final PacketReceiveEvent event) {
final Packet<?> packet = event.getPacket();
if (packet instanceof S08PacketPlayerPosLook) {
final S08PacketPlayerPosLook teleport = (S08PacketPlayerPosLook) packet;
switch (mode.getMode()) {
case "Vanilla":
yaw = teleport.yaw;
pitch = teleport.pitch;
teleport.yaw = mc.thePlayer.rotationYaw;
teleport.pitch = mc.thePlayer.rotationPitch;
break;
case "Delay":
yaw = mc.thePlayer.rotationYaw;
pitch = mc.thePlayer.rotationPitch;
break;
case "Legit":
yaw = teleport.getYaw();
pitch = teleport.getPitch();
startingYaw = mc.thePlayer.rotationYaw;
startingPitch = mc.thePlayer.rotationPitch;
teleport.yaw = mc.thePlayer.rotationYaw;
teleport.pitch = mc.thePlayer.rotationPitch;
break;
}
}
}
@Override
public void onPreMotion(final PreMotionEvent event) {
switch (mode.getMode()) {
case "Delay":
if (yaw != null && pitch != null) {
mc.thePlayer.rotationYaw = yaw;
mc.thePlayer.rotationPitch = pitch;
yaw = null;
pitch = null;
}
break;
case "Legit":
if (yaw != null && pitch != null && startingYaw != null && startingPitch != null) {
if (startingYaw == event.getYaw() && startingPitch == event.getPitch()) {
event.setYaw(yaw);
event.setPitch(pitch);
} else {
startingPitch = startingYaw = yaw = pitch = null;
}
}
break;
}
}
}
// NOTE (AI): Pure rotation strip. The S08 yaw and pitch are overwritten with the client's current rotation before the vanilla handler applies them, so the server's forced rotation never lands. The Vanilla mode stores the server rotation and replays it on the next PreMotion; Delay mode defers it explicitly; Legit mode only applies the stored rotation if the mouse has not moved since. Keeping the real server yaw and pitch lets ClickTP, Freecam and aim modules keep working off true values. Sigma 4.11's NoRotate is the same idea with one unconditional mode: yaw and pitch are replaced with the client's, no restore path.Suppress the block push and track teleport pressure: S08 packets are counted as the server's attempt to eject the player from a block.
Rise 6.x VulcanPhase increments teleportCount on every S08 and stands its state machine down after four, letting blocks push the player out; it also cancels PushOutOfBlockEvent and fakes onGround = false while inside a block. Sigma Phase and Blink handle S08 on their packet bus to mask teleports during blink windows.
// ===== FILE: Rise 6.1.30, com/alan/clients/module/impl/movement/phase/VulcanPhase.java =====
package com.alan.clients.module.impl.movement.phase;
import com.alan.clients.component.impl.render.SmoothCameraComponent;
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.motion.PushOutOfBlockEvent;
import com.alan.clients.event.impl.motion.StrafeEvent;
import com.alan.clients.event.impl.other.BlockAABBEvent;
import com.alan.clients.event.impl.other.TickEvent;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.module.impl.movement.Phase;
import com.alan.clients.util.chat.ChatUtil;
import com.alan.clients.util.player.MoveUtil;
import com.alan.clients.util.player.PlayerUtil;
import com.alan.clients.util.player.SlotUtil;
import com.alan.clients.value.Mode;
import net.minecraft.block.BlockAir;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import net.minecraft.potion.Potion;
import net.minecraft.util.AxisAlignedBB;
public class VulcanPhase extends Mode<Phase> {
private boolean teleport = false;
private boolean speed2 = false;
private boolean enable = true;
private int teleportCount = 0;
private int timer1 = 0;
private int tickCounter = 0;
private boolean lastRightClick = false;
private boolean done = true;
private boolean flag = true;
public VulcanPhase(String name, Phase parent) {
super(name, parent);
}
@Override
public void onEnable() {
speed2 = false;
done = true;
flag = true;
timer1 = 0;
teleportCount = 0;
teleport = false;
enable = true;
if( mc.thePlayer.onGround ){
mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY - 1, mc.thePlayer.posZ);
MoveUtil.stop();
} else{
ChatUtil.display("You must me on the ground to do this");
getModule(Phase.class).toggle();
}
}
@Override
public void onDisable() {
speed2 = false;
}
@EventLink
public final Listener<PreMotionEvent> onPreMotion = event -> {
mc.thePlayer.cameraYaw = 0.1F;
if( timer1 > 25) {
if(PlayerUtil.insideBlock()) {
if(mc.thePlayer.motionY>0){
}
mc.thePlayer.onGround = false;
}
}
if(PlayerUtil.insideBlock()){
timer1++;
}
if(done && timer1<25) {
SmoothCameraComponent.setY();
} else if(flag){
}
if((PlayerUtil.insideBlock() && !enable && flag)){
flag = false;
ChatUtil.display("Phased");
}
if((PlayerUtil.insideBlock() && !enable)){
}
};
@EventLink
public final Listener<BlockAABBEvent> onBlockAABB = event -> {
if (PlayerUtil.insideBlock()) {
event.setBoundingBox(null);
// Sets The Bounding Box To The Players Y Position.
if (!(event.getBlock() instanceof BlockAir) && !mc.gameSettings.keyBindSneak.isKeyDown()) {
final double x = event.getBlockPos().getX(), y = event.getBlockPos().getY(), z = event.getBlockPos().getZ();
if (y < mc.thePlayer.posY) {
event.setBoundingBox(AxisAlignedBB.fromBounds(-15, -1, -15, 15, 1, 15).offset(x, y, z));
}
}
} else if (!teleport){
if (event.getBlock() instanceof BlockAir && !mc.thePlayer.isSneaking()) {
final double x = event.getBlockPos().getX(), y = event.getBlockPos().getY(), z = event.getBlockPos().getZ();
if (y < mc.thePlayer.posY) {
event.setBoundingBox(AxisAlignedBB.fromBounds(-15, -1, -15, 15, 1, 15).offset(x, y, z));
}
}
}
else if (teleport && !PlayerUtil.insideBlock()){
ChatUtil.display("Disabled due to not being in a block");
getModule(Phase.class).toggle();
}
};
@EventLink
public final Listener<TickEvent> onTick = event -> {
};
@EventLink
public final Listener<StrafeEvent> onStrafe = event -> {
int blockSlot = SlotUtil.findBlock();
if(mc.gameSettings.keyBindJump.isKeyDown() && mc.thePlayer.hurtTime>0){
mc.thePlayer.motionY=.99;
} else if (mc.gameSettings.keyBindSneak.isKeyDown()){
mc.thePlayer.motionY=-.4;
} else if (!mc.gameSettings.keyBindJump.isKeyDown() && PlayerUtil.insideBlock() && timer1 > 25){
mc.thePlayer.motionY=0;
}
if(PlayerUtil.insideBlock()) {
if (mc.thePlayer.isPotionActive(Potion.moveSpeed)) {
event.setSpeed(((.0765*(1+(mc.thePlayer.getActivePotionEffect(Potion.moveSpeed).getAmplifier()))) +.306));
} else {
event.setSpeed(.306);
}
}
if (mc.thePlayer.onGround && enable && teleport){
mc.thePlayer.jump();
teleport = false;
enable = false;
}
if (mc.thePlayer.onGround && !teleport &&!enable) {
if (mc.thePlayer.ticksExisted % 2 == 1|| !(mc.thePlayer.moveForward ==0 )) {
event.setForward(1);
} else {
MoveUtil.strafe(0);
event.setForward(-1);
}
}
};
@EventLink
public final Listener<PacketReceiveEvent> onPacketReceive = event -> {
Packet<?> packet = event.getPacket();
if (packet instanceof S08PacketPlayerPosLook) {
teleport = true;
teleportCount++;
}
if (teleportCount > 4) {
done = false;
} else{
done = true;
}
};
@EventLink
public final Listener<PushOutOfBlockEvent> onPushOutOfBlock = event -> {
event.setCancelled();
};
}
// NOTE (AI): Teleport-counting phase. Every S08 increments teleportCount and raises the teleport flag; after 4 teleports the module drops done to false so BlockAABBEvent stops suppressing collisions and the server can push the player out. The S08 stream is the signal that Vulcan detected the phase and is forcing the player out; the module uses the count to wind down its own state machine instead of fighting the teleport directly. PreMotion also fakes onGround = false while inside a block so the server's ground state cannot snap the player, and PushOutOfBlockEvent is cancelled outright.Use the S08 teleport as the rescue signal: when the server lag-backs the falling player, reset fallDistance so the server's own teleport becomes the save.
Spicy AntiVoid in Hypixel mode hooks EventPacket: on S08 while off ground, past fallDistance 20 (or below y = 0) and over void, it zeroes fallDistance. The EventUpdate path then bounces once per fall with a C03 onGround and a C04 at posY + 12. Rise VulcanAntiVoid clears its noBlock flag on S08 to re-arm the jump suppression.
// ===== FILE: Spicy, info/spicyclient/modules/player/AntiVoid.java =====
package info.spicyclient.modules.player;
import java.util.Random;
import org.apache.commons.lang3.StringUtils;
import org.lwjgl.input.Keyboard;
import info.spicyclient.SpicyClient;
import info.spicyclient.chatCommands.Command;
import info.spicyclient.events.Event;
import info.spicyclient.events.listeners.EventChatmessage;
import info.spicyclient.events.listeners.EventMotion;
import info.spicyclient.events.listeners.EventPacket;
import info.spicyclient.events.listeners.EventUpdate;
import info.spicyclient.modules.Module;
import info.spicyclient.notifications.Color;
import info.spicyclient.notifications.NotificationManager;
import info.spicyclient.notifications.Type;
import info.spicyclient.settings.BooleanSetting;
import info.spicyclient.settings.ModeSetting;
import info.spicyclient.settings.NumberSetting;
import info.spicyclient.util.MovementUtils;
import info.spicyclient.util.Timer;
import net.minecraft.block.BlockAir;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MathHelper;
public class AntiVoid extends Module {
public BooleanSetting jumpFirst = new BooleanSetting("Jump first", false);
private ModeSetting mode = new ModeSetting("Mode", "Hypixel", "Hypixel");
public AntiVoid() {
super("Anti Void", Keyboard.KEY_NONE, Category.PLAYER);
resetSettings();
}
@Override
public void resetSettings() {
this.settings.clear();
this.addSettings(mode, jumpFirst);
}
public void onEnable() {
}
public void onDisable() {
}
public static boolean bounced = false;
public void onEvent(Event e) {
if (e instanceof EventPacket) {
if (e.isPre()) {
boolean isOverVoid = true;
BlockPos block = mc.thePlayer.getPosition();
for (int i = (int) mc.thePlayer.posY; i > 0; i--) {
if (isOverVoid) {
if (!(mc.theWorld.getBlockState(block).getBlock() instanceof BlockAir)) {
isOverVoid = false;
}
}
block = block.add(0, -1, 0);
}
try {
if (mode.is("Hypixel") && ((EventPacket) e).packet instanceof S08PacketPlayerPosLook && !MovementUtils.isOnGround(0.001) && (mc.thePlayer.fallDistance >= 20.0f || mc.thePlayer.posY < 0) && isOverVoid) {
mc.thePlayer.fallDistance = 0;
}
} catch (NullPointerException e2) {
}
}
}
if (e instanceof EventUpdate) {
if (e.isPre()) {
if (mode.is("Hypixel") && !SpicyClient.config.fly.isEnabled()) {
this.additionalInformation = "Hypixel";
boolean isOverVoid = true;
BlockPos block = mc.thePlayer.getPosition();
for (int i = (int) mc.thePlayer.posY; i > 0; i--) {
if (isOverVoid) {
if (!(mc.theWorld.getBlockState(block).getBlock() instanceof BlockAir)) {
isOverVoid = false;
}
}
block = block.add(0, -1, 0);
}
if (!MovementUtils.isOnGround(0.001) && (mc.thePlayer.fallDistance >= 20.0f || mc.thePlayer.posY < 0) && isOverVoid) {
if (!bounced) {
bounced = true;
if (jumpFirst.isEnabled()) {
mc.thePlayer.motionY = 0.2d*11d;
mc.thePlayer.fallDistance = 4;
mc.thePlayer.onGround = false;
//Command.sendPrivateChatMessage(mc.thePlayer.motionY);
}
}else {
Random r = new Random();
mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer(true));
//mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY - 3, mc.thePlayer.posZ, false));
mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + 12, mc.thePlayer.posZ, false));
//mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 6, mc.thePlayer.posZ);
mc.thePlayer.fallDistance = -1;
NotificationManager.getNotificationManager().createNotification("Antivoid saved you", "", true, 2000, Type.INFO, Color.BLUE);
//mc.thePlayer.motionY = 1;
//float f = mc.thePlayer.rotationYaw * 0.017453292F;
//mc.thePlayer.motionX -= (double)(MathHelper.sin(f) * 0.035f);
//c.thePlayer.motionZ += (double)(MathHelper.cos(f) * 0.035f);
}
}else if (!isOverVoid && mc.thePlayer.fallDistance <= 2) {
bounced = false;
}
}
}
}
}
}
// NOTE (AI): Hypixel anti-void. When an S08 teleport arrives while the player is off ground, past fallDistance 20 (or below y = 0) and over void, the module resets fallDistance. The trick is that the server only teleports after the fall is confirmed, so zeroing fallDistance on the teleport turns the server's own lag-back into the rescue. The EventUpdate path does the actual bounce (C03 onGround followed by C04 at posY + 12) once per fall via the bounced flag; the S08 hook by itself only eats the flag. A NullPointerException guard wraps the packet read, which is typical of this client's defensive style.Auto-disable movement modules when the server rubberbands, so a flagged boost quits before the anti-cheat accumulates a ban.
On S08, gated by a 2000 ms delay, check whether Speed, LongJump, Fly, Flight or Step is toggled and the player is pressing a movement key; toggle the offending module off and print a colored chat notice per module.
// ===== FILE: LiquidSense Dev, me/AquaVit/liquidSense/modules/misc/LagBack.java =====
package me.AquaVit.liquidSense.modules.misc;
import me.AquaVit.liquidSense.modules.movement.Flight;
import net.ccbluex.liquidbounce.LiquidBounce;
import net.ccbluex.liquidbounce.event.EventTarget;
import net.ccbluex.liquidbounce.event.PacketEvent;
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.features.module.modules.movement.LongJump;
import net.ccbluex.liquidbounce.features.module.modules.movement.Speed;
import net.ccbluex.liquidbounce.features.module.modules.movement.Step;
import net.ccbluex.liquidbounce.utils.timer.TimeUtils;
import net.ccbluex.liquidbounce.value.BoolValue;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import net.minecraft.util.ChatComponentText;
@ModuleInfo(name = "LagBack", description = "LagBack", category = ModuleCategory.MISC)
public class LagBack extends Module {
public final BoolValue speedlag = new BoolValue("Speed", true);
public final BoolValue longjumplag = new BoolValue("LongJump", true);
public final BoolValue flylag = new BoolValue("Fly", true);
public final BoolValue steplag = new BoolValue("Step", true);
private TimeUtils deactivationDelay = new TimeUtils();
@EventTarget
public void onPacket(PacketEvent event) {
Speed speed = (Speed) LiquidBounce.moduleManager.getModule(Speed.class);
LongJump longjump = (LongJump) LiquidBounce.moduleManager.getModule(LongJump.class);
Fly fly = (Fly) LiquidBounce.moduleManager.getModule(Fly.class);
Flight flight = (Flight) LiquidBounce.moduleManager.getModule(Flight.class);
Step step = (Step) LiquidBounce.moduleManager.getModule(Step.class);
if (event.getPacket() instanceof S08PacketPlayerPosLook && this.deactivationDelay.delay(2000F)) {
if (speedlag.get()) {
if (speed.getState()) {
if(mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown()){
LiquidBounce.moduleManager.getModule(Speed.class).setState(false);
mc.thePlayer.addChatMessage(new ChatComponentText("§8[§9§l" +LiquidBounce.CLIENT_NAME+ "§8] §3"+ "SpeedLagBack"));
}
}
}
if (longjumplag.get()) {
if (longjump.getState() && mc.thePlayer.motionX == 0 && mc.thePlayer.motionZ == 0) {
if(mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown()){
LiquidBounce.moduleManager.getModule(LongJump.class).setState(false);
mc.thePlayer.addChatMessage(new ChatComponentText("§8[§9§l" +LiquidBounce.CLIENT_NAME+ "§8] §3"+ "LongJumpLagBack"));
}
}
}
if(flylag.get()){
if(fly.getState() || flight.getState()) {
if (mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown()) {
LiquidBounce.moduleManager.getModule(Fly.class).setState(false);
LiquidBounce.moduleManager.getModule(Flight.class).setState(false);
mc.thePlayer.addChatMessage(new ChatComponentText("§8[§9§l" +LiquidBounce.CLIENT_NAME+ "§8] §3"+ "FlyLagBack"));
}
}
}
if (steplag.get()) {
if (step.getState() && mc.thePlayer.motionX == 0 && mc.thePlayer.motionZ == 0) {
if(mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown()){
LiquidBounce.moduleManager.getModule(Step.class).setState(false);
mc.thePlayer.addChatMessage(new ChatComponentText("§8[§9§l" +LiquidBounce.CLIENT_NAME+ "§8] §3"+ "StepLagBack"));
}
}
}
}
}
}
// NOTE (AI): The single packet handler watches S08 and, once per 2000 ms, disables whichever of Speed, LongJump, Fly, Flight or Step is toggled and moving, printing a colored chat notice per module. It is a flag-avoidance helper rather than a movement exploit itself.
Use the server's own lag-back as the arm signal: cancel all C03 until S08 arrives, then walk the computed path with C04s.
onEnable provokes the lag-back with C0F(0,-1,false), a flying-abilities C13 and C04 +0.17/+0.06. While !tp every C03 is cancelled; the first S08 flips tp and the tick handler replays the fall ladder and walks the PathfindingUtils path with per-vec3 C04s, finishing with C03(true) and C0C input.
// ===== FILE: LiquidSense Dev, me/AquaVit/liquidSense/modules/world/Tp.java =====
package me.AquaVit.liquidSense.modules.world;
import net.ccbluex.liquidbounce.event.EventTarget;
import net.ccbluex.liquidbounce.event.MoveEvent;
import net.ccbluex.liquidbounce.event.PacketEvent;
import net.ccbluex.liquidbounce.event.TickEvent;
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.utils.ClientUtils;
import net.ccbluex.liquidbounce.utils.CustomVec3;
import net.ccbluex.liquidbounce.utils.PathfindingUtils;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.entity.player.PlayerCapabilities;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.client.C0CPacketInput;
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
import net.minecraft.network.play.client.C13PacketPlayerAbilities;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import static net.ccbluex.liquidbounce.utils.MovementUtils.getMaxFallDist;
@ModuleInfo(name = "Tp",description = "Allows you to teleport around.", category = ModuleCategory.WORLD,array = false)
public class Tp extends Module {
public static float x;
public static float y;
public static float z;
boolean tp;
@Override
public void onEnable() {
if (mc.thePlayer == null)
return;
tp = false;
ClientUtils.displayChatMessage("Wait For Server LagBack");
PlayerCapabilities playerCapabilities = new PlayerCapabilities();
playerCapabilities.isFlying = true;
mc.getNetHandler().addToSendQueue(new C0FPacketConfirmTransaction(0, (short)(-1), false));
mc.getNetHandler().addToSendQueue(new C13PacketPlayerAbilities(playerCapabilities));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX,
mc.thePlayer.posY + 0.17, mc.thePlayer.posZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX,
mc.thePlayer.posY + 0.06, mc.thePlayer.posZ, true));
mc.thePlayer.stepHeight = 0.0f;
mc.thePlayer.motionX = 0.0;
mc.thePlayer.motionZ = 0.0;
}
@Override
public void onDisable() {
mc.timer.timerSpeed = 1.0f;
mc.thePlayer.stepHeight = 0.625f;
mc.thePlayer.motionX = 0.0;
mc.thePlayer.motionZ = 0.0;
}
@EventTarget
public void onTick(TickEvent event) {
if (tp) {
double offset = 0.060100000351667404;
NetHandlerPlayClient netHandler = mc.getNetHandler();
EntityPlayerSP player = mc.thePlayer;
double x2 = player.posX;
double y2 = player.posY;
double z2 = player.posZ;
int i = 0;
while (i < getMaxFallDist() / 0.05510000046342611 + 1.0) {
netHandler.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(x2, y2 + 0.060100000351667404, z2, false));
netHandler.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(x2, y2 + 5.000000237487257E-4, z2, false));
netHandler.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(x2, y2 + 0.004999999888241291 + 6.01000003516674E-8, z2, false));
++i;
}
netHandler.addToSendQueue(new C03PacketPlayer(true));
mc.getNetHandler().addToSendQueue(new C0CPacketInput(0.0f, 0.0f, true, true));
double lastY = mc.thePlayer.posY, downY = 0;
for (CustomVec3 vec3 : PathfindingUtils.computePath(
new CustomVec3(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ),
new CustomVec3(x, y, z))) {
if (vec3.getY() < lastY) {
downY += (lastY - vec3.getY());
}
if (downY > 2.5) {
downY = 0;
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(vec3.getX(),
vec3.getY(), vec3.getZ(), true));
} else {
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(vec3.getX(),
vec3.getY(), vec3.getZ(), false));
}
lastY = vec3.getY();
}
//Teleported
mc.thePlayer.setPosition(x, y, z);
this.setState(false);
}
}
@EventTarget
public void onMove(MoveEvent e) {
if (!tp) {
e.cancelEvent();
}
}
@EventTarget
public final void onSendPacket(PacketEvent event) {
if (!tp && event.getPacket() instanceof C03PacketPlayer) {
event.cancelEvent();
}
if (event.getPacket() instanceof S08PacketPlayerPosLook) {
if (!this.tp) {
this.tp = true;
ClientUtils.displayChatMessage("Start TelePort");
}
}
}
}
// NOTE (AI): The S08 hit is the arm signal: while !tp every C03 is cancelled, and the first S08 flips tp so the tick handler walks the computed path with per-vec3 C04s and the fall-ladder offsets. onEnable provokes the lag-back with a C0F(0,-1,false), a flying-abilities C13 and C04 +0.17/+0.06.
anticheat Anti-Cheat Checks
S08 is the server's authoritative position correction and the landing pad for every movement flag: setback, phase and speed checks all terminate in a rubberband teleport. On the OUT side, anticheats do three things with it: record the exact teleported coordinates and the teleport id, bracket the teleport between transaction packets so the confirm can be time-ordered, and verify that the client's C06 confirm matches the coordinates the server actually sent. The four checks below cover that full pipeline, from the packet listener that converts relative flags to absolute positions (Grim) to the confirm verifier that kicks on a mismatch (CheaterDeleter).
Tracks every outgoing player teleport so the simulation knows the client's authoritative position and can enforce it in later movement checks.
Listens on the OUT side for the player position-and-look packet, seeds the player's tracked position on join, converts relative flags to absolute coordinates (rewriting the packet for 1.8-era clients), and brackets the teleport with a transaction sandwich so the exact arrival tick is known. Vehicle teleports are recorded against the same transaction stream.
// ===== FILE: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/events/packets/PacketServerTeleport.java =====
package ac.grim.grimac.events.packets;
import ac.grim.grimac.GrimAPI;
import ac.grim.grimac.player.GrimPlayer;
import ac.grim.grimac.utils.data.IntToObjectPair;
import ac.grim.grimac.utils.math.Location;
import com.github.retrooper.packetevents.PacketEvents;
import com.github.retrooper.packetevents.event.PacketListenerAbstract;
import com.github.retrooper.packetevents.event.PacketListenerPriority;
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.player.ClientVersion;
import com.github.retrooper.packetevents.protocol.teleport.RelativeFlag;
import com.github.retrooper.packetevents.util.Vector3d;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerPlayerPositionAndLook;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerVehicleMove;
public class PacketServerTeleport extends PacketListenerAbstract {
private static final boolean STUPID_TELEPORT_SYSTEM = PacketEvents.getAPI().getServerManager().getVersion().isNewerThanOrEquals(ServerVersion.V_1_21_2);
public PacketServerTeleport() {
super(PacketListenerPriority.LOW);
}
@Override
public void onPacketSend(PacketSendEvent event) {
if (event.getPacketType() == PacketType.Play.Server.PLAYER_POSITION_AND_LOOK) {
GrimPlayer player = GrimAPI.INSTANCE.getPlayerDataManager().getPlayer(event.getUser());
if (player == null) return;
WrapperPlayServerPlayerPositionAndLook teleport = new WrapperPlayServerPlayerPositionAndLook(event);
Vector3d pos = new Vector3d(teleport.getX(), teleport.getY(), teleport.getZ());
// This is the first packet sent to the client which we need to track
if (player.getSetbackTeleportUtil().getRequiredSetBack() == null) {
// Player teleport event gets called AFTER player join event
player.x = teleport.getX();
player.y = teleport.getY();
player.z = teleport.getZ();
player.yaw = teleport.getYaw();
player.pitch = teleport.getPitch();
player.lastX = teleport.getX();
player.lastY = teleport.getY();
player.lastZ = teleport.getZ();
player.lastYaw = teleport.getYaw();
player.lastPitch = teleport.getPitch();
player.pollData();
}
// Convert relative teleports to normal teleports
// We have to do this because 1.8 players on 1.9+ get teleports changed by ViaVersion
// Additionally, velocity is kept after relative teleports making predictions difficult
// The added complexity isn't worth a feature that I have never seen used
//
// If you do actually need this make an issue on GitHub with an explanation for why
if (player.getClientVersion().isOlderThanOrEquals(ClientVersion.V_1_8) || player.inVehicle()) {
boolean relativeX = teleport.isRelativeFlag(RelativeFlag.X),
relativeY = teleport.isRelativeFlag(RelativeFlag.Y),
relativeZ = teleport.isRelativeFlag(RelativeFlag.Z);
if (relativeX) {
pos = pos.add(new Vector3d(player.x, 0, 0));
teleport.setRelative(RelativeFlag.X, false);
}
if (relativeY) {
pos = pos.add(new Vector3d(0, player.y, 0));
teleport.setRelative(RelativeFlag.Y, false);
}
if (relativeZ) {
pos = pos.add(new Vector3d(0, 0, player.z));
teleport.setRelative(RelativeFlag.Z, false);
}
if (relativeX || relativeY || relativeZ) {
teleport.setX(pos.getX());
teleport.setY(pos.getY());
teleport.setZ(pos.getZ());
event.markForReEncode(true);
}
}
if (STUPID_TELEPORT_SYSTEM && player.inVehicle()) {
boolean relativeDeltaX = teleport.isRelativeFlag(RelativeFlag.DELTA_X),
relativeDeltaY = teleport.isRelativeFlag(RelativeFlag.DELTA_Y),
relativeDeltaZ = teleport.isRelativeFlag(RelativeFlag.DELTA_Z);
if (relativeDeltaX) {
teleport.setRelative(RelativeFlag.DELTA_X, false);
}
if (relativeDeltaY) {
teleport.setRelative(RelativeFlag.DELTA_Y, false);
}
if (relativeDeltaZ) {
teleport.setRelative(RelativeFlag.DELTA_Z, false);
}
if (relativeDeltaX || relativeDeltaY || relativeDeltaZ) {
teleport.setDeltaMovement(Vector3d.zero());
event.markForReEncode(true);
}
}
// 1.21.2+ client ignore teleports if player is inside vehicle, ABSOLUTE CINEMA MOJANG
if (player.getClientVersion().isNewerThanOrEquals(ClientVersion.V_1_21_2) && player.compensatedEntities.serverPlayerVehicle != null) {
pos = player.getSetbackTeleportUtil().lastKnownGoodPosition.getPos();
}
player.sendTransaction();
final int lastTransactionSent = player.lastTransactionSent.get();
event.getTasksAfterSend().add(player::sendTransaction);
if (teleport.isDismountVehicle()) {
// Remove player from vehicle
event.getTasksAfterSend().add(() -> player.compensatedEntities.self.eject());
}
// For some reason, teleports on 1.7 are offset by 1.62?
if (event.getServerVersion().isOlderThan(ServerVersion.V_1_8))
pos = pos.withY(pos.getY() - 1.62);
Location target = new Location(null, pos.getX(), pos.getY(), pos.getZ(), teleport.getYaw(), teleport.getPitch());
player.getSetbackTeleportUtil().addSentTeleport(target, teleport.getDeltaMovement(), lastTransactionSent, teleport.getRelativeFlags(), true, teleport.getTeleportId());
}
if (event.getPacketType() == PacketType.Play.Server.VEHICLE_MOVE) {
GrimPlayer player = GrimAPI.INSTANCE.getPlayerDataManager().getPlayer(event.getUser());
if (player == null) return;
player.sendTransaction();
event.getTasksAfterSend().add(player::sendTransaction);
player.vehicleData.vehicleTeleports.add(new IntToObjectPair<>(
player.lastTransactionSent.get(),
new WrapperPlayServerVehicleMove(event).getPosition()
));
}
}
}
// NOTE (AI): Grim converts relative teleports to absolute ones because ViaVersion can rewrite them for 1.8 players, which would break prediction; the transaction sandwich around the teleport is what lets the setback system order it against movement.Verifies that the client's teleport confirm returns the exact coordinates the server sent, kicking on any mismatch.
Stores the target position (resolving relative flags against the player's current position) keyed by the S08 teleport id. When the client sends the matching teleport-confirm packet, the check compares each axis of the attached movement packet against the stored target: absolute axes must match exactly, relative axes must be within 10 blocks. Any disagreement kicks the player.
// ===== FILE: CoolMineman-CheaterDeleter, src/main/java/io/github/coolmineman/cheaterdeleter/modules/movement/TeleportVerifierCheck.java =====
package io.github.coolmineman.cheaterdeleter.modules.movement;
import java.util.Objects;
import io.github.coolmineman.cheaterdeleter.events.OutgoingTeleportListener;
import io.github.coolmineman.cheaterdeleter.events.TeleportConfirmListener;
import io.github.coolmineman.cheaterdeleter.modules.CDModule;
import io.github.coolmineman.cheaterdeleter.objects.PlayerMoveC2SPacketView;
import io.github.coolmineman.cheaterdeleter.objects.PlayerPositionLookS2CPacketView;
import io.github.coolmineman.cheaterdeleter.objects.entity.CDPlayer;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMaps;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import net.minecraft.network.packet.c2s.play.TeleportConfirmC2SPacket;
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket.Flag;
public class TeleportVerifierCheck extends CDModule implements TeleportConfirmListener, OutgoingTeleportListener {
public TeleportVerifierCheck() {
super("teleport_verifier_check");
TeleportConfirmListener.EVENT.register(this);
OutgoingTeleportListener.EVENT.register(this);
}
private static class TeleportVerifierCheckData {
public Int2ObjectMap<TeleportInfo> teleports = Int2ObjectMaps.synchronize(new Int2ObjectOpenHashMap<>());
}
private static class TeleportInfo {
public final double x;
public final double y;
public final double z;
public final boolean exactX;
public final boolean exactY;
public final boolean exactZ;
public TeleportInfo(CDPlayer player, PlayerPositionLookS2CPacketView view) {
if (view.getFlags().contains(Flag.X)) {
exactX = false;
x = view.getX() + player.getX();
} else {
exactX = true;
x = view.getX();
}
if (view.getFlags().contains(Flag.Y)) {
exactY = false;
y = view.getY() + player.getY();
} else {
exactY = true;
y = view.getY();
}
if (view.getFlags().contains(Flag.Z)) {
exactZ = false;
z = view.getZ() + player.getZ();
} else {
exactZ = true;
z = view.getZ();
}
}
}
@Override
public void onTeleportConfirm(CDPlayer player, TeleportConfirmC2SPacket teleportConfirmC2SPacket, PlayerMoveC2SPacketView playerMoveC2SPacketView) {
TeleportInfo teleport = player.getData(TeleportVerifierCheckData.class).teleports.get(teleportConfirmC2SPacket.getTeleportId());
player.getData(TeleportVerifierCheckData.class).teleports.remove(teleportConfirmC2SPacket.getTeleportId());
if (enabledFor(player)) {
Objects.requireNonNull(teleport, "If this is null and player is not cheating you should panic");
assertAxis(player, "x", teleport.exactX, playerMoveC2SPacketView.getX(), teleport.x);
assertAxis(player, "y", teleport.exactY, playerMoveC2SPacketView.getY(), teleport.y);
assertAxis(player, "z", teleport.exactZ, playerMoveC2SPacketView.getZ(), teleport.z);
}
}
private void assertAxis(CDPlayer player, String axis, boolean exact, double obtained, double target) {
if (exact) {
assertOrKick(obtained == target, player, "Bad Teleport " + axis + " expected: " + target + " got: " + obtained);
} else {
assertOrKick(Math.abs(target - obtained) < 10, player, "Bad Teleport " + axis + " expected: " + target + " got: " + obtained); // TODO this is bad
}
}
@Override
public void onOutgoingTeleport(CDPlayer player, PlayerPositionLookS2CPacketView packet) {
TeleportVerifierCheckData data = player.getOrCreateData(TeleportVerifierCheckData.class, TeleportVerifierCheckData::new);
data.teleports.put(packet.getTeleportId(), new TeleportInfo(player, packet));
}
}
// NOTE (AI): This is the strict end of the spectrum: a single wrong coordinate kicks, with no buffer or violation counter.Compensates outgoing teleport packets so movement checks can distinguish a teleport from an illegal position jump.
On the OUT side it wraps the position-and-look packet (plus entity teleport and rotation packets for the player) into a Teleport record that is only added to the eligible list after the confirmation tracker's pre-transaction fires. On the IN side, every flying packet is matched against eligible teleports: onGround flag, absolute coordinates and rotations must line up, with a 2.0E-4 leniency for relative axes when the player did not send a position packet the previous tick. Teleports that never match become a missedTeleport state for the checks.
// ===== FILE: amnoah-BetterAnticheat, core/src/main/java/better/anticheat/core/player/tracker/impl/teleport/TeleportTracker.java =====
package better.anticheat.core.player.tracker.impl.teleport;
import better.anticheat.core.player.Player;
import better.anticheat.core.player.tracker.Tracker;
import com.github.retrooper.packetevents.event.simple.PacketPlayReceiveEvent;
import com.github.retrooper.packetevents.event.simple.PacketPlaySendEvent;
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
import com.github.retrooper.packetevents.protocol.player.ClientVersion;
import com.github.retrooper.packetevents.protocol.teleport.RelativeFlag;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientPlayerFlying;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerEntityTeleport;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerPlayerPositionAndLook;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerPlayerRotation;
import lombok.Getter;
import wtf.spare.sparej.Pair;
import java.util.ArrayList;
import java.util.List;
/**
* This tracker compensates teleportation packets and checks whether a player's movement matches an eligible teleport.
*/
public class TeleportTracker extends Tracker {
private final List<Teleport> eligibleTeleports = new ArrayList<>(), remove = new ArrayList<>();
@Getter
private boolean teleported = true, positionTeleported = true, rotationTeleported = true, missedTeleport = false;
private boolean positionLastTick = false, positionThisTick = false;
private final boolean supportsTickEnd;
public TeleportTracker(Player player) {
super(player);
this.supportsTickEnd = player.getUser().getClientVersion()
.isNewerThanOrEquals(ClientVersion.V_1_21_2);
}
@Override
public void handlePacketPlayReceive(PacketPlayReceiveEvent event) {
if (event.getPacketType() == PacketType.Play.Client.CLIENT_TICK_END) handleTickEnd();
if (!WrapperPlayClientPlayerFlying.isFlying(event.getPacketType())) return;
final var wrapper = new WrapperPlayClientPlayerFlying(event);
if (!supportsTickEnd) handleTickEnd();
if (wrapper.hasPositionChanged()) positionThisTick = true;
for (final var teleport : eligibleTeleports) {
if (match(teleport, wrapper)) {
if (teleport.getPosition() != null) positionTeleported = true;
if (teleport.getRotation() != null) rotationTeleported = true;
teleported = true;
teleport.setHandled(true);
}
/*
* Players receive teleports sequentially, so if they haven't handled this teleport yet then they can't
* handle any future ones.
* Another intended feature: we allow players to potentially qualify for a teleport multiple times. We could
* be wrong and they hadn't actually teleported (such as the scenario a player is standing still, teleports
* to themself, they have a network lag spike after confirming the pre, and then they start moving. Once
* their network resumes they would teleport but we would have already wrongly assumed they had teleported).
* This could allow for potential exploitation of the anticheat, but it can be fixed by lag compensating
* more. The more things we have lag compensated, the more harmful it is for a player to modify this
* behavior.
* This could also be fixed with a prediction system, but that's a long ways out.
*/
// Note: Commented out for now to try to increase handler performance!
//if (!teleport.isHandled()) break;
}
}
/**
* Handle compensating different types of teleport packets.
*/
@Override
public void handlePacketPlaySend(PacketPlaySendEvent event) {
switch (event.getPacketType()) {
case ENTITY_TELEPORT -> {
WrapperPlayServerEntityTeleport wrapper = new WrapperPlayServerEntityTeleport(event);
if (wrapper.getEntityId() != player.getUser().getEntityId()) return;
Teleport teleport = new Teleport(wrapper.getPosition(), new Pair<>(wrapper.getPitch(), wrapper.getYaw()), wrapper.getRelativeFlags(), wrapper.isOnGround());
handleTeleport(teleport);
}
case PLAYER_ROTATION -> {
WrapperPlayServerPlayerRotation wrapper = new WrapperPlayServerPlayerRotation(event);
Teleport teleport = new Teleport(null, new Pair<>(wrapper.getPitch(), wrapper.getYaw()), null, null);
handleTeleport(teleport);
}
case PLAYER_POSITION_AND_LOOK -> {
WrapperPlayServerPlayerPositionAndLook wrapper = new WrapperPlayServerPlayerPositionAndLook(event);
Teleport teleport = new Teleport(wrapper.getPosition(), new Pair<>(wrapper.getPitch(), wrapper.getYaw()), wrapper.getRelativeFlags(), null);
handleTeleport(teleport);
}
}
}
/**
* Handles a tickend. Is a separate method for compatibility so we can support pre 1.21.2.
*/
private void handleTickEnd() {
positionTeleported = rotationTeleported = missedTeleport = teleported = false;
positionLastTick = positionThisTick;
positionThisTick = false;
/*
* Due to the current design of our confirmation system, teleports do not actually resolve within our
* confirmation window. Rather, they resolve in the tick following the post transaction (apart from world
* change teleports! Which resolve in time for some reason?). So, we handle it here in the following tick if
* needed.
*/
for (Teleport teleport : remove) {
eligibleTeleports.remove(teleport);
if (!teleport.isHandled()) missedTeleport = true;
}
remove.clear();
}
/**
* Handle compensating teleports. When the initial confirmation returns, we start including the teleport. When the
* post confirmation returns, we remove the teleport.
*/
private void handleTeleport(Teleport teleport) {
var confirm = player.getConfirmationTracker().confirm();
confirm.onBegin(() -> {
eligibleTeleports.add(teleport);
});
confirm.onAfterConfirm(() -> {
remove.add(teleport);
});
}
/**
* This method checks whether the given Teleport matches the player's current Flying packet. To check this, we see
* if the onGround status, position, and rotation matches. We also account for relative movements,
*/
private boolean match(Teleport teleport, WrapperPlayClientPlayerFlying wrapper) {
/*
* Player Rotations and Player Position and Look packets don't define a ground status.
* Entity Teleport define a ground status.
*/
ground:
{
if (teleport.getOnGround() == null) break ground;
if (!teleport.getOnGround().equals(wrapper.isOnGround())) return false;
}
/*
* Entity Teleport and Player Position and Look define a position.
* Player Rotations don't define a position.
*/
position:
{
if (teleport.getPosition() == null) break position;
if (!wrapper.hasPositionChanged()) return false;
double x = teleport.getPosition().getX(), y = teleport.getPosition().getY(), z = teleport.getPosition().getZ();
boolean relX = false, relY = false, relZ = false;
if (teleport.getRelativeFlags() != null) {
if (teleport.getRelativeFlags().has(RelativeFlag.X)) {
x += player.getPositionTracker().getLastX();
relX = true;
}
if (teleport.getRelativeFlags().has(RelativeFlag.Y)) {
y += player.getPositionTracker().getLastY();
relY = true;
}
if (teleport.getRelativeFlags().has(RelativeFlag.Z)) {
z += player.getPositionTracker().getLastZ();
relZ = true;
}
}
if (!compareCoordinate(x, wrapper.getLocation().getX(), relX)) return false;
if (!compareCoordinate(y, wrapper.getLocation().getY(), relY)) return false;
if (!compareCoordinate(z, wrapper.getLocation().getZ(), relZ)) return false;
}
/*
* Currently no teleport packets don't include a rotation, but I don't trust Mojang so we futureproof!
*/
rotation:
{
if (teleport.getRotation() == null) break rotation;
if (!wrapper.hasRotationChanged()) return false;
float pitch = teleport.getRotation().getX(), yaw = teleport.getRotation().getY();
if (teleport.getRelativeFlags() != null) {
if (teleport.getRelativeFlags().has(RelativeFlag.YAW) || teleport.getRelativeFlags().has(RelativeFlag.PITCH))
break rotation;
/*
// Rotation relatives seems to be messing up a lot right now. So, we don't care about it until we figure
// out.
if (teleport.getRelativeFlags().has(RelativeFlag.PITCH)) {
// Pitch is bounded -90 to 90
if (pitch < 0) {
pitch = Math.max(-90, player.getRotationTracker().getLastPitch() + pitch);
} else {
pitch = Math.min(90, player.getRotationTracker().getLastPitch() + pitch);
}
}
if (teleport.getRelativeFlags().has(RelativeFlag.YAW)) yaw += player.getRotationTracker().getLastYaw();
*/
}
// Verify equality.
if (pitch != wrapper.getLocation().getPitch() || yaw != wrapper.getLocation().getYaw()) return false;
}
return true;
}
/**
* See ArtificialPositionCheck.java for an explanation behind the value used here.
* Check if the player's coordinate is accurate for their teleport.
*/
private boolean compareCoordinate(double first, double second, boolean relative) {
/*
* If the teleport is not a relative, it must be an exact match to the teleport.
* If a teleport is relative, it means that it is based on the previous position.
* If the player did not send a position packet in their last tick, it means they could have desynced and their
* movement could be off by up to 2.0E-4 (see ArtificialPositionCheck.java for an explanation on the value).
*/
if (relative) {
double leniency;
if (positionLastTick) leniency = 0;
else leniency = 2.0E-4;
return Math.abs(first - second) <= leniency;
} else return first == second;
}
}
// NOTE (AI): Teleports resolve in the tick after the post transaction rather than inside the confirmation window, which the tracker handles explicitly for pre-1.21.2 clients.Feeds server teleport and entity-teleport packets into the movement holder so position checks run against the post-teleport state.
Handles the OUT position packet and the player's entity-teleport packet. For entity teleports it registers a transaction-confirmed action: on the pre side it moves the last velocity into lastVelocity, installs the teleported position as the current movement and location, and marks the movement as teleport-processed; the post side clears that flag once the client confirms.
// ===== FILE: artemisac-artemis-minecraft-anticheat, ac.artemis.core/src/main/java/ac/artemis/core/v4/processor/teleport/TeleportPreProcessor.java =====
package ac.artemis.core.v4.processor.teleport;
import ac.artemis.core.v4.data.holders.ConnectionHolder;
import ac.artemis.core.v4.processor.AbstractHandler;
import ac.artemis.core.v4.data.PlayerData;
import ac.artemis.core.v4.utils.function.PacketAction;
import cc.ghast.packet.PacketAPI;
import ac.artemis.packet.spigot.wrappers.GPacket;
import ac.artemis.core.v4.utils.position.PlayerMovement;
import ac.artemis.core.v4.utils.position.PlayerRotation;
import cc.ghast.packet.wrapper.packet.play.server.GPacketPlayServerEntityTeleport;
import cc.ghast.packet.wrapper.packet.play.server.GPacketPlayServerPosition;
import java.util.Map;
import java.util.Random;
import java.util.WeakHashMap;
public class TeleportPreProcessor extends AbstractHandler {
public TeleportPreProcessor(PlayerData data) {
super("Teleport [0x01]", data);
}
@Override
public void handle(final GPacket packet) {
if (packet instanceof GPacketPlayServerPosition) {
final GPacketPlayServerPosition pos = (GPacketPlayServerPosition) packet;
}
else if (packet instanceof GPacketPlayServerEntityTeleport) {
final GPacketPlayServerEntityTeleport pos = (GPacketPlayServerEntityTeleport) packet;
if (pos.getEntityId() != data.getPlayer().getEntityId()) {
return;
}
data.connection.confirmFunction(ConnectionHolder.ConfirmationType.TRANSACTION, new PacketAction() {
@Override
public void pre() {
data.connection.setLastEntityTeleport(pos);
final PlayerMovement movement = new PlayerMovement(
data.getPlayer().getWorld(),
pos.getValueX(),
pos.getValueY(),
pos.getValueZ(),
pos.getValueYaw(),
pos.getValuePitch(),
pos.getTimestamp()
);
if (data.movement.getVelocity() != null)
data.movement.setLastVelocity(data.movement.getVelocity());
data.movement.setMovement(movement.setWorld(data.getPlayer().getWorld()));
data.movement.setLocation(movement.setWorld(data.getPlayer().getWorld()));
data.movement.setRotation(new PlayerRotation(data.getPlayer(),
movement.getYaw(),
movement.getPitch(),
movement.getTimestamp())
);
data.movement.setProcessedEntityTeleport(true);
}
@Override
public void post() {
data.movement.setProcessedEntityTeleport(false);
}
});
}
}
}
// NOTE (AI): The transaction confirmation is what makes the teleport apply in the correct tick relative to the client's own processing.Related Packets
Wiki Cross-Reference
Yaw is measured in degrees starting at 0 and is never clamped, and may be negative or above 360.
Pitch is measured in degrees with 0 looking straight ahead, -90 straight up and 90 straight down.
The server ignores the client movement packets sent before the client was aware of the teleport until it receives the matching confirm, and if the player is riding a vehicle the teleport has no effect but confirm packets are still sent.
MCP 1.8.9 S08PacketPlayerPosLook implements Packet
1.8.9 callers: NetHandlerPlayServer.setPlayerLocation sends new S08PacketPlayerPosLook (line 484): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/network/NetHandlerPlayServer.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 S08PacketPlayerPosLook
Full source walkthroughs of the modules and anti-cheats that use this packet.