0x19 S19PacketEntityHeadLook
Updates an entity's head yaw rotation independently of body rotation.
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| entityId | VarInt | Entity ID |
| headYaw | byte | Head yaw × 256/360 |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Entity ID | VarInt | |
| Head Yaw | byte | yaw * 256/360 |
MCP References
NetHandlerPlayClient.handleEntityHeadLook()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 | |
Deobfuscated MCP 1.8.9 source of S19PacketEntityHeadLook, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S19PacketEntityHeadLook.java) at build time and verified present.
Deep Dive
Role in the protocol
S19PacketEntityHeadLook updates only the head yaw of an entity, independent of the body yaw carried by S16/S17. The wire format is a VarInt entityId plus one byte decoded as yaw * 360 / 256. The server sends it whenever the head rotation changes: EntityTrackerEntry broadcasts it to tracked players (corpus line 236, sendPacketToTrackedPlayers(new S19PacketEntityHeadLook(trackedEntity, (byte) l))) while body rotation travels in the S14 family. It is the only rotation packet keyed to the head rather than the body.
Vanilla handling
NetHandlerPlayClient.handleEntityHeadLook (Memeware 7.3 bundle, line 573) resolves the entity and calls setRotationYawHead(yaw * 360 / 256.0F). Only yaw is transmitted; the head pitch is derived from the body pitch at render time, and the model's head mesh rotates around the neck joint using this value. The body rotation is untouched, which is why a player can look sideways while running straight.
Why clients touch it
None of the 8 clients has an ESP, Tracers or KillAura module that reads S19. The corpus consumers are all Rise 6.x infrastructure and one velocity module: WatchdogVelocity includes S19 in the spoof packet set so a held head-look update completes the backtrack illusion, PingSpoofComponent classifies it in the players tuple (delayed with the S14 family and S18), the translation PacketType maps ENTITY_HEAD_LOOK into the position cache, and NetworkAPI whitelists it for scripts in both 6.1.30 and 6.2.4. Renderers skip it because aim indicators are derived from body yaw/pitch in S16/S17; head yaw only affects the model mesh.
Exploit surface
The packet is cosmetic clientbound state with no serverbound counterpart and no server-side validation, so there is no direct abuse. The interesting quirk is in the translation cache: ENTITY_HEAD_LOOK writes the decoded head yaw into the Position.yaw slot while keeping pitch, so the cached orientation becomes the head yaw until the next S16/S17 overwrites it. Any aim or rotation math fed from that cache inherits the error. Backtrack modules that hold S19 along with the movement set produce the visible frozen-head artifact, which is a staff-visible tell rather than a detection risk.
Server-Side Handling
Clientbound only. The server emits it from EntityTrackerEntry when the tracked entity's head yaw changes, and the client applies it as setRotationYawHead with the * 360 / 256 decode. There is no rate limit or validation; a server can spam it harmlessly. The client-side consequence is limited to the model's head rotation and any module that consumes rotation state.
Protocol Analysis
Single byte angle, decode yaw * 360 / 256.0F. Body yaw lives in S16/S17; head yaw lives here; the two can differ by up to 180 degrees for a player looking over the shoulder. S19 arrives at the same tracking cadence as the S14 family and typically interleaves with it. The translation cache's ENTITY_HEAD_LOOK handler overwrites the yaw slot, so cached positions diverge from vanilla rotation semantics until the next look packet.
Anti-Cheat Landscape
No server anticheat consumes head yaw; killaura rotation-sync detection works on the serverbound C05/C06 look packets, not on this clientbound announcement. For cheat clients the only relevance is fidelity: backtrack and reach modules that reconstruct entity state must either include S19 in the held set (WatchdogVelocity) or accept that the reconstructed orientation drifts. There is no flag surface, only visual artifacts.
implementation Implementation Cases
The head-look packet is the least-touched entity packet in the corpus: no renderer or aim module in the 8 clients reads it. It survives only in Rise 6.x packet-classification components (PingSpoofComponent, translation PacketType) and WatchdogVelocity's backtrack set, plus the script API whitelist.
Hold S19PacketEntityHeadLook with the S14 movement subclasses and S18 so the backtracked target's full state, including head rotation, replays coherently.
isSpoof2Packet returns true for S19PacketEntityHeadLook, so while the backtrack is active the packet is cancelled in PacketReceiveEvent and queued, then replayed through PacketUtil.receive on the flush conditions (elapsed 100-250 ms, distance threshold crossing, hurtTime == 9, world age under 100 ticks).
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/combat/velocity/WatchdogVelocity.java =====
package com.alan.clients.module.impl.combat.velocity;
import com.alan.clients.component.impl.player.PingSpoofComponent;
import com.alan.clients.component.impl.player.TargetComponent;
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.*;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.event.impl.packet.PacketSendEvent;
import com.alan.clients.event.impl.render.Render3DEvent;
import com.alan.clients.module.impl.combat.Criticals;
import com.alan.clients.module.impl.combat.KillAura;
import com.alan.clients.module.impl.combat.Velocity;
import com.alan.clients.module.impl.movement.Flight;
import com.alan.clients.module.impl.movement.LongJump;
import com.alan.clients.module.impl.movement.Speed;
import com.alan.clients.module.impl.player.Scaffold;
import com.alan.clients.module.impl.render.chat.Chat;
import com.alan.clients.util.chat.ChatUtil;
import com.alan.clients.util.packet.PacketUtil;
import com.alan.clients.util.player.MoveUtil;
import com.alan.clients.util.player.PlayerUtil;
import com.alan.clients.util.render.ColorUtil;
import com.alan.clients.util.render.RenderUtil;
import com.alan.clients.util.vector.Vector2d;
import com.alan.clients.value.Mode;
import com.alan.clients.value.impl.BooleanValue;
import com.alan.clients.value.impl.NumberValue;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C0BPacketEntityAction;
import net.minecraft.network.play.server.*;
import net.minecraft.util.Vec3;
import org.lwjgl.opengl.GL11;
import java.awt.*;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.ConcurrentLinkedQueue;
public final class WatchdogVelocity extends Mode<Velocity> {
public WatchdogVelocity(String name, Velocity parent) {
super(name, parent);
}
private long active2StartTime = -1; // Tracks when active2 was set to true
boolean active2 = false;
boolean send = false;
public final BooleanValue stack = new BooleanValue("Stack", this, true);
public final BooleanValue spoof = new BooleanValue("Ping Spoof", this, true);
public final BooleanValue spoof2 = new BooleanValue("Watchdog Backtrack", this, false);
public final BooleanValue boost = new BooleanValue("Damage Boost (not for hypixel)", this, false);
private final NumberValue speed = new NumberValue("Damage Boost Speed", this, 1, 1, 10, .01);
private boolean active, receiving, buffer;
private Vec3 realPosition = new Vec3(0, 0, 0);
public Entity targetEntity;
private int amount;
private final ArrayList<Packet<?>> packets = new ArrayList<>();
private boolean isSpoof2Packet(Packet<?> packet) {
return packet instanceof S14PacketEntity.S16PacketEntityLook ||
packet instanceof S14PacketEntity.S15PacketEntityRelMove ||
packet instanceof S14PacketEntity.S17PacketEntityLookMove ||
packet instanceof S19PacketEntityHeadLook ||
packet instanceof S18PacketEntityTeleport;
}
@EventLink
public final Listener<PacketReceiveEvent> onPacketReceive = event -> {
if (receiving || getModule(LongJump.class).isEnabled() && mc.thePlayer.offGroundTicks<29 || getModule(Flight.class).isEnabled()) return;
switch (event.getPacket()) {
case S12PacketEntityVelocity velocity -> {
if (velocity.getEntityID() == mc.thePlayer.getEntityId()) {
if (stack.getValue() && amount < 1 && (!mc.thePlayer.onGround) && Math.random() < 0.73 && !(mc.thePlayer.offGroundTicks > 13) || mc.thePlayer.inWater || (getModule(Scaffold.class).isEnabled() )) {
amount++;
buffer = true;
// ChatUtil.display("stack");
event.setCancelled();
buffer = false;
}
if (!event.isCancelled() && (!getModule(Scaffold.class).isEnabled() ) && !(mc.thePlayer.offGroundTicks > 11) && ((!mc.thePlayer.onGround ) || (mc.thePlayer.onGround && !MoveUtil.isMoving())) && !(velocity.getMotionY()/800D < .08 && !(getModule(Speed.class).isEnabled() || mc.thePlayer.inWater || !mc.thePlayer.isInLava()) )) {
amount = 0;
active = true;
// ChatUtil.display("Set Active");
packets.add(velocity);
event.setCancelled();
} else if (!event.isCancelled() ) {
if((!getModule(Scaffold.class).isEnabled() )){
mc.thePlayer.motionY = velocity.getMotionY() / 8000.0D;
}
// ChatUtil.display("normal");
event.setCancelled();
}
}
}
case S32PacketConfirmTransaction transaction -> {
if (active && spoof.getValue()) {
packets.add(transaction);
event.setCancelled();
// PingSpoofComponent.spoof(50, true, false, false, false, false, false);
}
}
case S00PacketKeepAlive keepAlive -> {
if (active && spoof.getValue()) {
// packets.add(keepAlive);
event.setCancelled();
}
}
case S14PacketEntity.S16PacketEntityLook s16PacketEntityLook -> {
if ((active2 || active) && spoof2.getValue() && !send) {
packets.add(s16PacketEntityLook);
event.setCancelled();
}
}
case S14PacketEntity.S15PacketEntityRelMove s15PacketEntityRelMove -> {
if ((active2 || active) && spoof2.getValue() && !send) {
packets.add(s15PacketEntityRelMove);
event.setCancelled();
}
}
case S14PacketEntity.S17PacketEntityLookMove s17PacketEntityLookMove -> {
if ((active2 || active) && spoof2.getValue() && !send) {
packets.add(s17PacketEntityLookMove);
event.setCancelled();
}
}
case S19PacketEntityHeadLook s19PacketEntityHeadLook -> {
if ((active2 || active) && spoof2.getValue() && !send) {
packets.add(s19PacketEntityHeadLook);
event.setCancelled();
}
}
default -> {
}
}
List<EntityLivingBase> targets = TargetComponent.getTargets(12);
targets.sort(Comparator.comparingDouble(entity -> entity.hurtTime));
if (targets.isEmpty()) {
targetEntity = null;
// Add logic here to reset or flush your spoof2 states.
// For example:
if (spoof2.getValue()) {
receiving = true;
packets.stream().filter(this::isSpoof2Packet).forEach(PacketUtil::receive);
packets.clear();
receiving = false;
active2 = false;
send = false;
}
return;
}
Entity entity = targets.get(0);
if (spoof2.getValue()) {
if (entity != targetEntity) {
targetEntity = entity;
realPosition.xCoord = entity.posX;
realPosition.yCoord = entity.posY;
realPosition.zCoord = entity.posZ;
}
Vec3 playerEyesPos = mc.thePlayer.getPositionEyes(1.0F);
Vec3 targetEyesPos = new Vec3(realPosition.xCoord, realPosition.yCoord, realPosition.zCoord);
double distance = playerEyesPos.distanceTo(targetEyesPos);
if ((distance > 4.5) && active || mc.thePlayer.offGroundTicks>9 && active) {
send = true;
} else if(active){
send = false;
}
//ChatUtil.display(distance);
active2 = distance < 4.5;
if( mc.thePlayer.isSwingInProgress && distance>3.1&& distance<4.5 && getModule(KillAura.class).isEnabled()){
// ChatUtil.display("reach:" + distance);
}
if (active2) {
// Check if this is the first frame where active2 is true
if (active2StartTime == -1) {
active2StartTime = System.currentTimeMillis(); // Record the starting time
}
// Check if 200ms has passed
if (System.currentTimeMillis() - active2StartTime >= Math.round((Math.random()*150))+100) {
receiving = true;
packets.stream()
.filter(this::isSpoof2Packet)
.forEach(PacketUtil::receive);
packets.clear();
receiving = false;
// ChatUtil.display(mc.thePlayer.ticksExisted);
// Reset active2 and timer
active2 = false;
active2StartTime = -1;
}
} else {
// Reset the timer if active2 is false
active2StartTime = -1;
}
if (send && active) {
// ChatUtil.display(send);
active2 = false; // If active2 is set to false, reset the timer
receiving = true;
packets.stream()
.filter(this::isSpoof2Packet)
.forEach(PacketUtil::receive);
packets.clear();
receiving = false;
}
if(mc.thePlayer.ticksExisted<100){
active2 = false; // If active2 is set to false, reset the timer
receiving = true;
packets.stream()
.filter(this::isSpoof2Packet)
.forEach(PacketUtil::receive);
packets.clear();
receiving = false;
}
if (mc.thePlayer.hurtTime == 9) {
// ChatUtil.display(send);
active2 = false;
receiving = true;
packets.stream()
.filter(this::isSpoof2Packet)
.forEach(PacketUtil::receive);
packets.clear();
receiving = false;
}
if ((distance < 2.5)) {
active2 = false;
// ChatUtil.display(send);
receiving = true;
packets.stream()
.filter(this::isSpoof2Packet)
.forEach(PacketUtil::receive);
packets.clear();
receiving = false;
}
if ((distance > 4.5)) {
active2 = false;
// ChatUtil.display(send);
receiving = true;
packets.stream()
.filter(this::isSpoof2Packet)
.forEach(PacketUtil::receive);
packets.clear();
receiving = false;
}
final Packet<?> packet = event.getPacket();
if (packet instanceof S14PacketEntity) {
S14PacketEntity s14PacketEntity = ((S14PacketEntity) packet);
if (s14PacketEntity.entityId == targetEntity.getEntityId()) {
realPosition.xCoord += s14PacketEntity.getPosX() / 32D;
realPosition.yCoord += s14PacketEntity.getPosY() / 32D;
realPosition.zCoord += s14PacketEntity.getPosZ() / 32D;
}
} else if (packet instanceof S18PacketEntityTeleport) {
S18PacketEntityTeleport s18PacketEntityTeleport = ((S18PacketEntityTeleport) packet);
if (s18PacketEntityTeleport.getEntityId() == targetEntity.getEntityId()) {
realPosition = new Vec3(s18PacketEntityTeleport.getX() / 32D, s18PacketEntityTeleport.getY() / 32D, s18PacketEntityTeleport.getZ() / 32D);
}
}
}
};
@EventLink(value = Priorities.VERY_HIGH)
public final Listener<JumpEvent> onJump = event -> {
if (mc.thePlayer.onGround && active) {
active = false;
// ChatUtil.display("Set Active");
receiving = true;
send = false;
// MoveUtil.strafe(MovdeUtil.getbaseMoveSpeed() + Math.random() / 10);
// mc.thePlayer.jump();
Vector2d motion = new Vector2d(mc.thePlayer.motionX, mc.thePlayer.motionZ);
packets.forEach(PacketUtil::receive);
// ChatUtil.display("jump");
packets.clear();
if (!boost.getValue()) {
mc.thePlayer.motionX = motion.getX();
mc.thePlayer.motionZ = motion.getY();
} else {
MoveUtil.strafe();
mc.thePlayer.motionX *= speed.getValue().doubleValue();
mc.thePlayer.motionZ *= speed.getValue().doubleValue();
}
receiving = false;
}
};
@EventLink(value = Priorities.VERY_HIGH)
public final Listener<PreUpdateEvent> onPreUpdate = event -> {
if(active2 && !active && spoof2.getValue()){
PingSpoofComponent.spoof(50, true, false, false, false, true, false);
}
};
@EventLink(value = Priorities.VERY_HIGH)
public final Listener<StrafeEvent> onStrafe = event -> {
if (mc.thePlayer.onGround && active && !mc.thePlayer.isJumping) {
active = false;
receiving = true;
send = false;
// MoveUtil.strafe(MoveUtil.WALK_SPEED);
Vector2d motion = new Vector2d(mc.thePlayer.motionX, mc.thePlayer.motionZ);
double motiony = mc.thePlayer.motionY;
// PingSpoofComponent.dispatch();
packets.forEach(PacketUtil::receive);
// ChatUtil.display("jump");
packets.clear();
mc.thePlayer.jump();
// PingSpoofComponent.dispatch();
mc.thePlayer.motionX = motion.getX();
mc.thePlayer.motionZ = motion.getY();
// active = false;
receiving = false;
// receiving = true;
// Vector2d motion = new Vector2d(mc.thePlayer.motionX, mc.thePlayer.motionZ);
// packets.forEach(PacketUtil::receive);
// ChatUtil.display("normal");
// packets.clear();
// mc.thePlayer.motionX = motion.getX();
// mc.thePlayer.motionZ = motion.getY();
// receiving = false;
}
};
@EventLink(value = Priorities.VERY_HIGH)
public final Listener<PostStrafeEvent> onPostStrafe = event -> {
if (mc.thePlayer.offGroundTicks > 12 && active) {
active = false;
receiving = true;
// MoveUtil.strafe(MoveUtil.getbaseMoveSpeed() + Math.random() / 10);
// mc.thePlayer.jump();
Vector2d motion = new Vector2d(mc.thePlayer.motionX, mc.thePlayer.motionZ);
double motiony = mc.thePlayer.motionY;
// PingSpoofComponent.dispatch();
packets.forEach(PacketUtil::receive);
// ChatUtil.display("jump");
packets.clear();
// PingSpoofComponent.dispatch();
mc.thePlayer.motionX = motion.getX();
mc.thePlayer.motionZ = motion.getY();
// mc.thePlayer.motionY = motiony;
receiving = false;
}
};
@EventLink()
public final Listener<Render3DEvent> onRender3D = event -> {
if (targetEntity == null || !spoof2.getValue() || (!active2 && !active)) {
return;
}
GlStateManager.pushMatrix();
GlStateManager.pushAttrib();
GlStateManager.enableBlend();
GlStateManager.disableTexture2D();
GlStateManager.disableLighting();
GL11.glDepthMask(false);
double expand = -0.14;
RenderUtil.color(Color.red, 45);
RenderUtil.drawBoundingBox(mc.thePlayer.getEntityBoundingBox()
.offset(-mc.thePlayer.posX, -mc.thePlayer.posY, -mc.thePlayer.posZ)
.offset(realPosition.xCoord, realPosition.yCoord, realPosition.zCoord)
.expand(expand, -.3, expand));
GlStateManager.enableTexture2D();
GlStateManager.enableLighting();
GlStateManager.disableBlend();
GL11.glDepthMask(true);
GlStateManager.popAttrib();
GlStateManager.popMatrix();
GlStateManager.resetColor();
};
}
// NOTE (AI): The Watchdog Backtrack path cancels the S14 subclasses plus S19PacketEntityHeadLook and
// NOTE (AI): S18PacketEntityTeleport for the nearest target and replays them through PacketUtil.receive
// NOTE (AI): after 100-250 ms or when the distance to the tracked realPosition crosses the 4.5/2.5
// NOTE (AI): thresholds. Buffering clientbound packets is invisible to the server, which is why the
// NOTE (AI): module can hold the target's movement state without raising flags.
Classify S19PacketEntityHeadLook as player traffic so it is parked with the rest of the entity stream while ping spoofing is active.
The players tuple lists S19PacketEntityHeadLook next to the S14 subclasses, S18PacketEntityTeleport, S20PacketEntityProperties and S13PacketDestroyEntities. While the component is enabled, every packet whose class matches an enabled tuple is cancelled on send/receive and parked as a TimedPacket, then flushed via PacketUtil.queue on PostMotion when the delay elapses or on world change.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/component/impl/player/PingSpoofComponent.java =====
package com.alan.clients.component.impl.player;
import com.alan.clients.component.Component;
import com.alan.clients.event.CancellableEvent;
import com.alan.clients.event.Listener;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.motion.PostMotionEvent;
import com.alan.clients.event.impl.other.WorldChangeEvent;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.event.impl.packet.PacketSendEvent;
import com.alan.clients.util.packet.PacketUtil;
import net.minecraft.client.gui.GuiDownloadTerrain;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.*;
import net.minecraft.network.play.server.*;
import net.minecraft.util.Tuple;
import rip.vantage.commons.util.time.StopWatch;
import java.util.Arrays;
import java.util.concurrent.ConcurrentLinkedQueue;
public final class PingSpoofComponent extends Component {
public static ConcurrentLinkedQueue<PacketUtil.TimedPacket> packets = new ConcurrentLinkedQueue<>();
static StopWatch enabledTimer = new StopWatch();
public static boolean enabled;
static long amount;
static Tuple<Class[], Boolean> regular = new Tuple<>(new Class[]{C0FPacketConfirmTransaction.class, C00PacketKeepAlive.class, S1CPacketEntityMetadata.class}, false);
static Tuple<Class[], Boolean> velocity = new Tuple<>(new Class[]{S12PacketEntityVelocity.class, S27PacketExplosion.class}, false);
static Tuple<Class[], Boolean> teleports = new Tuple<>(new Class[]{S08PacketPlayerPosLook.class, S39PacketPlayerAbilities.class, S09PacketHeldItemChange.class}, false);
static Tuple<Class[], Boolean> players = new Tuple<>(new Class[]{S13PacketDestroyEntities.class, S14PacketEntity.class, S14PacketEntity.S16PacketEntityLook.class, S14PacketEntity.S15PacketEntityRelMove.class, S14PacketEntity.S17PacketEntityLookMove.class, S18PacketEntityTeleport.class, S20PacketEntityProperties.class, S19PacketEntityHeadLook.class}, false);
static Tuple<Class[], Boolean> blink = new Tuple<>(new Class[]{C02PacketUseEntity.class, C0DPacketCloseWindow.class, C0EPacketClickWindow.class, C0CPacketInput.class, C0BPacketEntityAction.class, C08PacketPlayerBlockPlacement.class, C07PacketPlayerDigging.class, C09PacketHeldItemChange.class, C13PacketPlayerAbilities.class, C15PacketClientSettings.class, C16PacketClientStatus.class, C17PacketCustomPayload.class, C18PacketSpectate.class, C19PacketResourcePackStatus.class, C03PacketPlayer.class, C03PacketPlayer.C04PacketPlayerPosition.class, C03PacketPlayer.C05PacketPlayerLook.class, C03PacketPlayer.C06PacketPlayerPosLook.class, C0APacketAnimation.class}, false);
static Tuple<Class[], Boolean> movement = new Tuple<>(new Class[]{C03PacketPlayer.class, C03PacketPlayer.C04PacketPlayerPosition.class, C03PacketPlayer.C05PacketPlayerLook.class, C03PacketPlayer.C06PacketPlayerPosLook.class}, false);
public static Tuple<Class[], Boolean>[] types = new Tuple[]{regular, velocity, teleports, players, blink, movement};
@EventLink
public final Listener<PacketSendEvent> send = event -> event.setCancelled(onPacket(event.getPacket(), event).isCancelled());
@EventLink
public final Listener<PacketReceiveEvent> receive = event -> event.setCancelled(onPacket(event.getPacket(), event).isCancelled());
public CancellableEvent onPacket(Packet<?> packet, CancellableEvent event) {
if (!event.isCancelled() && enabled && Arrays.stream(types).anyMatch(tuple -> tuple.getSecond() && Arrays.stream(tuple.getFirst()).anyMatch(regularpacket -> regularpacket == packet.getClass()))) {
event.setCancelled();
packets.add(new PacketUtil.TimedPacket(packet));
}
return event;
}
public static void dispatch() {
if (!packets.isEmpty()) {
// Stops the packets from being called twice
boolean enabled = PingSpoofComponent.enabled;
PingSpoofComponent.enabled = false;
packets.forEach(timedPacket -> PacketUtil.queue(timedPacket.getPacket()));
PingSpoofComponent.enabled = enabled;
packets.clear();
}
}
public static void disable() {
enabled = false;
enabledTimer.setMillis(enabledTimer.millis - 999999999);
}
@EventLink
public final Listener<WorldChangeEvent> onWorldChange = event -> dispatch();
@EventLink
public final Listener<PostMotionEvent> onPostMotion = event -> {
if (!(enabled = !enabledTimer.finished(100) && !(mc.currentScreen instanceof GuiDownloadTerrain))) {
dispatch();
} else {
// Stops the packets from being called twice
enabled = false;
packets.forEach(packet -> {
if (packet.getTime() + amount < System.currentTimeMillis()) {
PacketUtil.queue(packet.getPacket());
packets.remove(packet);
}
});
enabled = true;
}
};
public static void spoof(int amount, boolean regular, boolean velocity, boolean teleports, boolean players) {
spoof(amount, regular, velocity, teleports, players, false);
}
public static void spoof(int amount, boolean regular, boolean velocity, boolean teleports, boolean players, boolean blink, boolean movement) {
enabledTimer.reset();
PingSpoofComponent.regular.setSecond(regular);
PingSpoofComponent.velocity.setSecond(velocity);
PingSpoofComponent.teleports.setSecond(teleports);
PingSpoofComponent.players.setSecond(players);
PingSpoofComponent.blink.setSecond(blink);
PingSpoofComponent.movement.setSecond(movement);
PingSpoofComponent.amount = amount;
}
public static void spoof(int amount, boolean regular, boolean velocity, boolean teleports, boolean players, boolean blink) {
spoof(amount, regular, velocity, teleports, players, blink, false);
}
public static void blink() {
spoof(9999999, true, false, false, false, true);
}
}
// NOTE (AI): The players tuple is the classification table that decides which clientbound packets are
// NOTE (AI): parked while ping spoofing. S19PacketEntityHeadLook sits in it next to the S14 subclasses,
// NOTE (AI): S18PacketEntityTeleport and S20PacketEntityProperties, so a head-look update for any entity
// NOTE (AI): is delayed with the rest of the entity stream and flushed by PacketUtil.queue on dispatch.
Write the decoded head yaw into the per-entity position cache used by the translation system.
ENTITY_HEAD_LOOK decodes headYaw as getYaw() * 360 / 256.0F, looks up the entity's cached Position and stores new Position(posX, posY, posZ, headYaw, currentPitch). It returns null when no entry exists, so head-look updates for entities that never spawned through the cache (no S0F/S0C seen) are silently dropped.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/component/impl/player/translation/PacketType.java =====
package com.alan.clients.component.impl.player.translation;
import lombok.Getter;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.*;
import java.util.Map;
import java.util.function.BiFunction;
public enum PacketType {
SPAWN_MOB(S0FPacketSpawnMob.class, (packet, entityPositions) -> {
S0FPacketSpawnMob spawnMobPacket = (S0FPacketSpawnMob) packet;
int entityId = spawnMobPacket.getEntityID();
double posX = spawnMobPacket.getX() / 32.0;
double posY = spawnMobPacket.getY() / 32.0;
double posZ = spawnMobPacket.getZ() / 32.0;
float yaw = (spawnMobPacket.getYaw() * 360) / 256.0F;
float pitch = (spawnMobPacket.getPitch() * 360) / 256.0F;
Position newPosition = new Position(posX, posY, posZ, yaw, pitch);
entityPositions.put(entityId, newPosition);
return entityPositions;
}),
ENTITY_TELEPORT(S18PacketEntityTeleport.class, (packet, entityPositions) -> {
S18PacketEntityTeleport teleportPacket = (S18PacketEntityTeleport) packet;
int entityId = teleportPacket.getEntityId();
double posX = teleportPacket.getX() / 32.0;
double posY = teleportPacket.getY() / 32.0;
double posZ = teleportPacket.getZ() / 32.0;
float yaw = (teleportPacket.getYaw() * 360) / 256.0F;
float pitch = (teleportPacket.getPitch() * 360) / 256.0F;
Position newPosition = new Position(posX, posY, posZ, yaw, pitch);
entityPositions.put(entityId, newPosition);
return entityPositions;
}),
ENTITY_REL_MOVE(S14PacketEntity.S15PacketEntityRelMove.class, (packet, entityPositions) -> {
S14PacketEntity.S15PacketEntityRelMove relMovePacket = (S14PacketEntity.S15PacketEntityRelMove) packet;
int entityId = relMovePacket.entityId;
Position currentPosition = entityPositions.get(entityId);
if (currentPosition != null) {
double newPosX = currentPosition.posX + relMovePacket.getPosX() / 32.0;
double newPosY = currentPosition.posY + relMovePacket.getPosY() / 32.0;
double newPosZ = currentPosition.posZ + relMovePacket.getPosZ() / 32.0;
float yaw = currentPosition.yaw;
float pitch = currentPosition.pitch;
Position newPosition = new Position(newPosX, newPosY, newPosZ, yaw, pitch);
entityPositions.put(entityId, newPosition);
return entityPositions;
}
return null;
}),
ENTITY_LOOK_MOVE(S14PacketEntity.S17PacketEntityLookMove.class, (packet, entityPositions) -> {
S14PacketEntity.S17PacketEntityLookMove lookMovePacket = (S14PacketEntity.S17PacketEntityLookMove) packet;
int entityId = lookMovePacket.getEntityId();
double deltaX = lookMovePacket.getPosX() / 32.0;
double deltaY = lookMovePacket.getPosY() / 32.0;
double deltaZ = lookMovePacket.getPosZ() / 32.0;
float yaw = (lookMovePacket.getYaw() * 360) / 256.0F;
float pitch = (lookMovePacket.getPitch() * 360) / 256.0F;
Position currentPosition = entityPositions.get(entityId);
if (currentPosition != null) {
double newPosX = currentPosition.posX + deltaX;
double newPosY = currentPosition.posY + deltaY;
double newPosZ = currentPosition.posZ + deltaZ;
// Ensure yaw and pitch are updated
Position newPosition = new Position(newPosX, newPosY, newPosZ, yaw, pitch);
entityPositions.put(entityId, newPosition);
return entityPositions;
}
return null;
}),
ENTITY_LOOK(S14PacketEntity.S16PacketEntityLook.class, (packet, entityPositions) -> {
S14PacketEntity.S16PacketEntityLook lookPacket = (S14PacketEntity.S16PacketEntityLook) packet;
int entityId = lookPacket.getEntityId();
float yaw = (lookPacket.getYaw() * 360) / 256.0F;
float pitch = (lookPacket.getPitch() * 360) / 256.0F;
Position currentPosition = entityPositions.get(entityId);
if (currentPosition != null) {
Position newPosition = new Position(currentPosition.posX, currentPosition.posY, currentPosition.posZ, yaw, pitch);
entityPositions.put(entityId, newPosition);
return entityPositions;
}
return null;
}),
DESTROY_ENTITY(S13PacketDestroyEntities.class, (packet, entityPositions) -> {
S13PacketDestroyEntities destroyEntitiesPacket = (S13PacketDestroyEntities) packet;
int[] entityIds = destroyEntitiesPacket.getEntityIDs();
for (int entityId : entityIds) {
entityPositions.remove(entityId);
}
return entityPositions;
}),
ENTITY_HEAD_LOOK(S19PacketEntityHeadLook.class, (packet, entityPositions) -> {
S19PacketEntityHeadLook headLookPacket = (S19PacketEntityHeadLook) packet;
int entityId = headLookPacket.getEntityId();
float headYaw = (headLookPacket.getYaw() * 360) / 256.0F;
Position currentPosition = entityPositions.get(entityId);
if (currentPosition != null) {
Position newPosition = new Position(currentPosition.posX, currentPosition.posY, currentPosition.posZ, headYaw, currentPosition.pitch);
entityPositions.put(entityId, newPosition);
return entityPositions;
}
return null;
});
@Getter
private final Class<? extends Packet<?>> packetClass;
private final BiFunction<Packet<?>, Map<Integer, Position>, Map<Integer, Position>> handler;
PacketType(Class<? extends Packet<?>> packetClass, BiFunction<Packet<?>, Map<Integer, Position>, Map<Integer, Position>> handler) {
this.packetClass = packetClass;
this.handler = handler;
}
public Map<Integer, Position> handle(Packet<?> packet, Map<Integer, Position> positions) {
return handler.apply(packet, positions);
}
}
// NOTE (AI): The translation component maintains a per-entity Position cache that mirrors server state
// NOTE (AI): independently of the vanilla renderer interpolation. ENTITY_REL_MOVE accumulates deltas,
// NOTE (AI): ENTITY_LOOK_MOVE and ENTITY_LOOK update yaw/pitch only when an entry already exists, and
// NOTE (AI): ENTITY_TELEPORT replaces the entry with absolute coordinates. The look-only handlers return
// NOTE (AI): null when the entity was never spawned into the cache (S0F/S0C never seen).
anticheat Anti-Cheat Checks
No server anticheat consumes the head-look packet: it carries only the head yaw byte, which plays no role in movement or combat verification. The corpus shows exactly two kinds of references: Artemis's packet-abstraction layer wraps the packet for its pipeline, and the NPC test rigs (PeyangSuperbAntiCheat, MinecraftAntiCheat) emit head rotations for fake players used to bait killaura. The packet is cosmetic clientbound state with no flag surface.
Register the head-rotation packet in Artemis's packet abstraction layer so the pipeline can classify it; the read buffer is empty.
The class is annotated with @PacketLink(PacketPlayServerEntityHeadRotation.class) and extends GPacket, binding the wrapper to the packet name; read() does nothing because no Artemis stage consumes the fields.
// ===== FILE: artemisac-artemis-minecraft-anticheat, ac.artemis.packet.spigot/src/main/java/cc/ghast/packet/wrapper/packet/play/server/GPacketPlayServerEntityHeadRotation.java =====
package cc.ghast.packet.wrapper.packet.play.server;
import ac.artemis.packet.protocol.ProtocolVersion;
import ac.artemis.packet.spigot.protocol.PacketLink;
import ac.artemis.packet.wrapper.server.PacketPlayServerEntityHeadRotation;
import cc.ghast.packet.buffer.ProtocolByteBuf;
import ac.artemis.packet.spigot.wrappers.GPacket;
import cc.ghast.packet.wrapper.packet.ReadableBuffer;
import java.util.UUID;
@PacketLink(PacketPlayServerEntityHeadRotation.class)
public class GPacketPlayServerEntityHeadRotation extends GPacket implements PacketPlayServerEntityHeadRotation, ReadableBuffer {
public GPacketPlayServerEntityHeadRotation(UUID player, ProtocolVersion version) {
super("PacketPlayOutEntityHeadRotation", player, version);
}
@Override
public void read(ProtocolByteBuf byteBuf) {
}
}
// NOTE (AI): The empty read() is the honest tell: Artemis registers the packet for pipeline completeness, not for any check.Emit head-rotation packets for fake players so NPC bait looks alive while testing whether a player's aim tracks them.
PeyangSuperbAntiCheat's NPCTeleport drives a fake EntityPlayer in a circle around the suspect (aura bot mode) or a panic radius (aura panic mode), sending PacketPlayOutEntityTeleport every tick plus PacketPlayOutEntityHeadRotation with the head yaw derived from the player's own head rotation. MinecraftAntiCheat's NPC utility sends the head-rotation packet through rotateHead alongside a look packet for any staff-created fake player.
// ===== FILE: P2P-Develop-PeyangSuperbAntiCheat, src/main/java/ml/peya/plugins/Detect/NPCTeleport.java =====
package ml.peya.plugins.Detect;
import develop.p2p.lib.*;
import ml.peya.plugins.Enum.*;
import ml.peya.plugins.*;
import net.minecraft.server.v1_12_R1.*;
import org.bukkit.*;
import org.bukkit.command.*;
import org.bukkit.craftbukkit.v1_12_R1.entity.*;
import org.bukkit.entity.*;
import org.bukkit.metadata.*;
import org.bukkit.scheduler.*;
import org.bukkit.util.Vector;
import java.util.*;
public class NPCTeleport
{
public static void teleport(Player player, EntityPlayer target, ItemStack[] arm, DetectType tpCase)
{
if (tpCase == DetectType.AURA_BOT)
auraBot_teleport(player, target, arm);
else if (tpCase == DetectType.AURA_PANIC)
auraPanic_teleport(player, target, arm, tpCase.getPanicCount(), tpCase.getSender());
}
private static void auraPanic_teleport(Player player, EntityPlayer target, ItemStack[] arm, int count, CommandSender sender)
{
final double range = PeyangSuperbAntiCheat.config.getDouble("npc.panicRange");
final double[] clt = {0.0};
final int[] now = {0};
PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;
int sec = PeyangSuperbAntiCheat.config.getInt("npc.seconds");
double delay = (1.5 / count) * sec;
new BukkitRunnable()
{
@Override
public void run()
{
now[0]++;
PacketPlayOutAnimation animation = new PacketPlayOutAnimation(((CraftPlayer) player).getHandle(), 1);
connection.sendPacket(animation);
HashMap<String, Object> map = new HashMap<>();
map.put("hit", now[0]);
map.put("max", count);
sender.sendMessage(MessageEngine.get("message.auraCheck.panic.lynx", map));
if (now[0] >= count)
this.cancel();
}
}.runTaskTimer(PeyangSuperbAntiCheat.getPlugin(), 0, 15 * (long) delay);
new BukkitRunnable()
{
public void run()
{
for (double i = 0; i < Math.PI * 2; i++)
{
Location center = player.getLocation();
if (center.getPitch() <= 0.0f || center.getPitch() > 15.0f)
center.setPitch(0.0f);
Vector vec = center.getDirection().multiply(0 - range);
Location n = center.add(vec);
n.setY(center.getY() + range);
n.setPitch(50);
float head = ((CraftPlayer) player).getHandle().getHeadRotation() * 0.5f;
if (head < 0)
head = head * 2;
NPC.setLocation(n, target);
connection.sendPacket(new PacketPlayOutEntityTeleport(target));
connection.sendPacket(new PacketPlayOutEntityHeadRotation(target, (byte) head));
NPC.setArmor(player, target, arm);
float finalHead = head;
new BukkitRunnable()
{
@Override
public void run()
{
for (Player p : Bukkit.getOnlinePlayers())
{
if (!p.hasPermission("psac.viewnpc"))
continue;
PlayerConnection c = ((CraftPlayer) p).getHandle().playerConnection;
c.sendPacket(new PacketPlayOutEntityTeleport(target));
connection.sendPacket(new PacketPlayOutEntityHeadRotation(target, (byte) finalHead));
NPC.setArmor(p, target, arm);
}
this.cancel();
}
}.runTask(PeyangSuperbAntiCheat.getPlugin());
}
clt[0] += 0.035;
if (clt[0] >= sec)
this.cancel();
}
}.runTaskTimer(PeyangSuperbAntiCheat.getPlugin(), 0, 1);
}
private static void auraBot_teleport(Player player, EntityPlayer target, ItemStack[] arm)
{
final double yaw = 360.0;
final double[] time = {0.0};
final double radius = PeyangSuperbAntiCheat.config.getDouble("npc.range");
WaveCreator creator = new WaveCreator(1.0, 2.0, 0.0);
WaveCreator ypp = new WaveCreator(10.0, 100.0, 10.0);
final boolean waveFlag = PeyangSuperbAntiCheat.config.getBoolean("npc.wave");
WaveCreator wave = new WaveCreator(radius - 0.1, radius, PeyangSuperbAntiCheat.config.getDouble("npc.waveMin"));
WaveCreator speedWave = new WaveCreator(0.0, PeyangSuperbAntiCheat.config.getDouble("npc.speed.waveRange"), 0 - PeyangSuperbAntiCheat.config.getDouble("npc.speed.waveRange"));
PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection;
final boolean speedWaveFlag = PeyangSuperbAntiCheat.config.getBoolean("npc.speed.wave");
final int[] count = {0};
BukkitRunnable r = new BukkitRunnable()
{
public void run()
{
double speed = 0.0;
if (player.hasMetadata("speed"))
{
for (MetadataValue value : player.getMetadata("speed"))
{
if (value.getOwningPlugin().getName().equals(PeyangSuperbAntiCheat.getPlugin().getName()))
speed = value.asDouble() * 2.0;
}
}
for (double i = 0; i < Math.PI * 2; i++)
{
double rangeTmp = radius;
if (waveFlag)
rangeTmp = wave.get(0.01, true);
Location center = player.getLocation();
Location n = new Location(
center.getWorld(),
auraBot_xPos(time[0], rangeTmp + speed) + center.getX(),
center.getY() + creator.get(0.01, count[0] < 20),
auraBot_zPos(time[0], rangeTmp + speed, yaw) + center.getZ(),
(float) ypp.getStatic(),
(float) ypp.get(4.5, false)
);
NPC.setLocation(n, target);
connection.sendPacket(new PacketPlayOutEntityTeleport(target));
NPC.setArmor(player, target, arm);
new BukkitRunnable()
{
@Override
public void run()
{
for (Player p : Bukkit.getOnlinePlayers())
{
if (!p.hasPermission("psac.viewnpc"))
continue;
PlayerConnection c = ((CraftPlayer) p).getHandle().playerConnection;
c.sendPacket(new PacketPlayOutEntityTeleport(target));
NPC.setArmor(p, target, arm);
}
this.cancel();
}
}.runTask(PeyangSuperbAntiCheat.getPlugin());
count[0]++;
}
time[0] += PeyangSuperbAntiCheat.config.getDouble("npc.time") + (speedWaveFlag ? speedWave.get(0.001, true) : 0.0);
}
};
r.runTaskTimer(PeyangSuperbAntiCheat.getPlugin(), 0, 1);
new BukkitRunnable()
{
@Override
public void run()
{
r.cancel();
this.cancel();
}
}.runTaskLater(PeyangSuperbAntiCheat.getPlugin(), 20 * (PeyangSuperbAntiCheat.config.getLong("npc.seconds")));
}
private static double auraBot_zPos(double time, double radius, double yaw)
{
return Math.sin(time) * radius * Math.cos(Math.PI / 180 * yaw);
}
private static double auraBot_xPos(double time, double radius)
{
return Math.cos(time) * radius;
}
}
// NOTE (AI): Both anticheats emit the packet for fake entities only; real player head yaw is never read server-side by any anticheat in the corpus.Related Packets
Wiki Cross-Reference
While the entity is stationary the body also rotates toward the head direction after a delay without changing the entity yaw value, and the body rotates back toward yaw once the entity starts moving.
While the entity is moving, head rotation is clamped to a maximum distance from body rotation, and for remote players the server keeps updating head rotation alongside body yaw.
MCP 1.8.9 S19PacketEntityHeadLook implements Packet
1.8.9 callers: EntityTrackerEntry.? sends new S19PacketEntityHeadLook (line 288): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/EntityTrackerEntry.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.