0x18 S18PacketEntityTeleport

Teleports an entity to an absolute position (fixed-point int × 32) and rotation.

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

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

entitypositionteleportmovement
Comprehensive 8/8

Fields

FieldTypeDescription
entityIdVarIntEntity ID
x/y/zfixed-point intAbsolute position × 32
yaw/pitchbyteRotation × 256/360
onGroundbooleanWhether the entity is on ground

Wire Encoding

FieldTypeNotes
Entity IDVarInt
XIntx * 32
YInty * 32
ZIntz * 32
Yawbyteyaw * 256/360
Pitchbytepitch * 256/360
On Groundbool

MCP References

MCPNetHandlerPlayClient.handleEntityTeleport()

Handler Interface

HNDINetHandlerPlayClient

Notes

Unlike S14 (Entity Relative Move), S18 sets ABSOLUTE position: the entity moves to this exact location regardless of where it was. Used when players teleport (ender pearls, chorus fruit), mobs teleport (endermen), or when S14 cumulative errors need correction.

Vanilla Source

S18PacketEntityTeleport.java116 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.entity.Entity;
5
import net.minecraft.network.Packet;
6
import net.minecraft.network.PacketBuffer;
7
import net.minecraft.network.play.INetHandlerPlayClient;
8
import net.minecraft.util.MathHelper;
9
10
public class S18PacketEntityTeleport implements Packet<INetHandlerPlayClient>
11
{
12
    private int entityId;
13
    private int posX;
14
    private int posY;
15
    private int posZ;
16
    private byte yaw;
17
    private byte pitch;
18
    private boolean onGround;
19
20
    public S18PacketEntityTeleport()
21
    {
22
    }
23
24
    public S18PacketEntityTeleport(Entity entityIn)
25
    {
26
        this.entityId = entityIn.getEntityId();
27
        this.posX = MathHelper.floor_double(entityIn.posX * 32.0D);
28
        this.posY = MathHelper.floor_double(entityIn.posY * 32.0D);
29
        this.posZ = MathHelper.floor_double(entityIn.posZ * 32.0D);
30
        this.yaw = (byte)((int)(entityIn.rotationYaw * 256.0F / 360.0F));
31
        this.pitch = (byte)((int)(entityIn.rotationPitch * 256.0F / 360.0F));
32
        this.onGround = entityIn.onGround;
33
    }
34
35
    public S18PacketEntityTeleport(int entityIdIn, int posXIn, int posYIn, int posZIn, byte yawIn, byte pitchIn, boolean onGroundIn)
36
    {
37
        this.entityId = entityIdIn;
38
        this.posX = posXIn;
39
        this.posY = posYIn;
40
        this.posZ = posZIn;
41
        this.yaw = yawIn;
42
        this.pitch = pitchIn;
43
        this.onGround = onGroundIn;
44
    }
45
46
    /**
47
     * Reads the raw packet data from the data stream.
48
     */
49
    public void readPacketData(PacketBuffer buf) throws IOException
50
    {
51
        this.entityId = buf.readVarIntFromBuffer();
52
        this.posX = buf.readInt();
53
        this.posY = buf.readInt();
54
        this.posZ = buf.readInt();
55
        this.yaw = buf.readByte();
56
        this.pitch = buf.readByte();
57
        this.onGround = buf.readBoolean();
58
    }
59
60
    /**
61
     * Writes the raw packet data to the data stream.
62
     */
63
    public void writePacketData(PacketBuffer buf) throws IOException
64
    {
65
        buf.writeVarIntToBuffer(this.entityId);
66
        buf.writeInt(this.posX);
67
        buf.writeInt(this.posY);
68
        buf.writeInt(this.posZ);
69
        buf.writeByte(this.yaw);
70
        buf.writeByte(this.pitch);
71
        buf.writeBoolean(this.onGround);
72
    }
73
74
    /**
75
     * Passes this Packet on to the NetHandler for processing.
76
     */
77
    public void processPacket(INetHandlerPlayClient handler)
78
    {
79
        handler.handleEntityTeleport(this);
80
    }
81
82
    public int getEntityId()
83
    {
84
        return this.entityId;
85
    }
86
87
    public int getX()
88
    {
89
        return this.posX;
90
    }
91
92
    public int getY()
93
    {
94
        return this.posY;
95
    }
96
97
    public int getZ()
98
    {
99
        return this.posZ;
100
    }
101
102
    public byte getYaw()
103
    {
104
        return this.yaw;
105
    }
106
107
    public byte getPitch()
108
    {
109
        return this.pitch;
110
    }
111
112
    public boolean getOnGround()
113
    {
114
        return this.onGround;
115
    }
116
}

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

Deep Dive

Role in the protocol

S18PacketEntityTeleport carries an absolute fixed-point position (ints x 32), rotation bytes and an onGround flag for one entity. It is the only entity-position packet with full coordinates, so it is both the correction mechanism for accumulated S14 error and the transport for genuine jumps: ender pearls, endermen, dimension changes and anything that moves more than 4 blocks in one tick. EntityTrackerEntry constructs it when the tracked entity's one-tick displacement exceeds the relative-move threshold (corpus line 222), and NetHandlerPlayServer sends it to a player on teleport (line 259).

Vanilla handling

NetHandlerPlayClient.handleEntityTeleport (Memeware 7.3 bundle, line 511) overwrites serverPosX/Y/Z with the absolute values, computes position as serverPos / 32.0 with y + 0.015625 (half a block in fixed point, the eye-height accommodation), decodes yaw/pitch as * 360 / 256, and calls setPositionAndRotation2 with interpolation 3 and the teleport flag. If the entity is already within 0.03125 blocks (x/z) and 0.015625 (y) of the target it keeps the current position and applies only rotation, which prevents micro-jitter on repeated teleports.

Why clients touch it

Five distinct consumers in the corpus. Rise 6.x: LegitReach snaps its realPosition to the absolute coordinates, WatchdogVelocity includes S18 in its spoof packet set and re-anchors on it, and PingSpoofComponent classifies it in the players tuple so teleports are delayed with the rest of the entity stream. Rise 5.99: PlayerData re-anchors serverPosX/Y/Z and zeroes ticksSinceLastTeleport so checks skip the teleport tick. Sigma 4.11: Ranking treats S18 as an entity-removal signal that finalizes kill/death records. Tenacity 6.0: AntiExploit cancels S18 with any coordinate beyond 30,000,000. Spicy: NoClip and Phase import the class but never branch on it, a leftover from their Sigma 2 lineage.

Exploit surface

S18 is clientbound and absolute, so the abuse direction is server to client: a malicious server can emit fixed-point coordinates that corrupt client-side position bookkeeping or trigger bounds bugs, which is exactly what Tenacity's AntiExploit threshold mitigates. For cheats, S18 is the epoch boundary of every position-based state machine: accumulated S14 error resets here, so reach and backtrack modules must re-anchor their reconstructed positions on it. The S08PacketPlayerPosLook + S18 pair is the server's complete teleport vocabulary, and disablers and reach modules watch both because a missed teleport poisons every later delta.

Server-Side Handling

The server side only emits S18, never validates it on receive. EntityTrackerEntry chooses it when the tracked entity moved 4+ blocks in a tick, and NetHandlerPlayServer sends it to a player being teleported. The client handler overwrites the entity's serverPosX/Y/Z, applies the +0.015625 y offset, keeps the current position when the entity is already within a 32nd of a block (rotation-only update), then interpolates with the teleport flag set. Because the client trusts the coordinates, a server can move an entity anywhere in the fixed-point range, which is the abuse AntiExploit guards against.

Protocol Analysis

Three ints (x 32), two bytes (x 256/360) and a boolean follow the VarInt entityId. The y offset of 0.015625 (0.5 / 32) is applied only on the client and is not part of the wire value. S18 supersedes any pending S14 deltas for the same entity because it overwrites the accumulated serverPosX/Y/Z. The packet is also sent to a player on respawn and dimension change, which is why Ranking's S08 + S18 combination distinguishes death from mere teleport.

Anti-Cheat Landscape

Server anticheats emit S18 as a correction and watch whether the client's later C03 positions rejoin the corrected location; a client that ignores the teleport or desyncs after it flags as position desync. The S08+S18 pair is the standard disabler/reach watch point: modules that delay clientbound traffic must flush on it or their position cache goes permanently stale. The client-side mirror (Rise 5.99 PlayerData) uses ticksSinceLastTeleport to suppress checks for a tick, an acknowledgment that even legitimate teleports produce movement anomalies.

implementation Implementation Cases

The absolute teleport packet is the reset point of entity position state. Cheat clients re-anchor their reconstructed position caches on it (LegitReach, WatchdogVelocity, Rise 5.99 anticheat), Sigma uses it as an entity-left signal, Tenacity hardens against server-side coordinate abuse, and Spicy's movement modules carry it as a dead import.

LegitReach (Rise 6.1.30, Rise 6.2.4)

Re-anchor the tracked target's server-truth position on the absolute teleport so the ping-spoof reach window keeps measuring the real distance.

In the same PacketReceiveEvent handler that accumulates S14 deltas, an S18 for the tracked target replaces realPosition with new Vec3(getX() / 32D, getY() / 32D, getZ() / 32D). Without this branch, a teleported target would leave the accumulated position permanently wrong and the reach window would either never open or stay open against a ghost position.

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

Vanilla hook: PacketReceiveEvent.
Re-anchoring is a correctness requirement, not an exploit: a stale realPosition makes the module either inert or visibly wrong. The reach abuse itself lives in the ping-spoof half, not in the S18 handling.
Variations: Identical module in Rise 6.1.30 (path without the Client-release2 prefix).
Ranking (Sigma 4.11)

Track kills and deaths for the client's stats system; an S18 teleport for a tracked player finalizes the pending record because a teleporting opponent is out of reach context.

A hidden, always-on module registered for EventAttack, EventPacket and EventUpdate. On EventAttack it records HitEntity entries per player; S0B animations timestamp attacker candidates; on S18 it calls onEntityRemoved(entityId), which flips the HitEntity to removed and reports killed() or prosecuted() if a chat message already matched the name in the last 3 seconds. S08PacketPlayerPosLook resets all prosecutor records (death/respawn), S13 destroys remove entities, S40 with 'ban' in the text reports a ban stat.

Source: Sigma 4.11, info/sigmaclient/module/impl/other/Ranking.java

Vanilla hook: EventPacket (receive side), EventAttack, EventUpdate.
Passive telemetry collection; the S18 branch is just an entity-lifetime heuristic. No packet is mutated or replayed, so there is no detection surface.
Variations: The sendStat methods are stubs in the shipped source; the kill/death reporting path is a framework for a stats backend that was never filled in.
NoClip / Phase (Spicy)

Corpus hit is an import only: both movement modules import S18PacketEntityTeleport but never branch on it.

NoClip's onEvent sends C03PacketPlayer.C04PacketPlayerPosition through sendPacketNoEvent when collided horizontally, then teleports the local player by 3 blocks up to break free; Phase cancels block hitboxes (EventGetBlockHitbox) and nudges the player position in a 3-stage loop while sending C03PacketPlayer(true). NoClip's header comment credits Sigma 2's Phase as the source, which explains the vestigial S18 import in both files.

Source: Spicy, info/spicyclient/modules/movement/NoClip.java

Vanilla hook: EventMotion (pre), EventGetBlockHitbox; S18 import unused.
The movement abuse is in the C03 stream, which is what anti-cheats flag (vertical motion while inside blocks). The unused S18 import has no effect on detection.
Variations: Phase.java (Spicy) carries the same dead import and additionally imports EventSendPacket; its hitbox-cancel approach is the more aggressive variant.
AntiExploit (Tenacity 6.0)

Harden the client against server-side crash and grief exploits; the S18 branch blocks teleport coordinates beyond the world border.

On PacketReceiveEvent, an S18 with any |getX()/getY()/getZ()| above 30,000,000 is cancelled and logged as 'Blocked Exploit: Teleport'. The same handler validates S48 resource pack URIs (http/https/level only, no path traversal), blocks S43 camera outside spectator, rejects particle floods, rate-limits S27 explosions and S11 experience orbs to 1 per millisecond, and caps total incoming packets at 100/second.

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

Vanilla hook: PacketReceiveEvent.
Cancelling clientbound packets is invisible to the server and cannot be flagged. The 30,000,000 bound matches the vanilla world border at which the server itself clamps movement.
Variations: Tenacity 6.0 is the only one of the 8 clients with a crash-exploit hardening module touching S18.
WatchdogVelocity (Rise 6.2.4)

Include the teleport in the backtrack packet set and use it to re-anchor the tracked target's realPosition.

isSpoof2Packet returns true for S18PacketEntityTeleport, so it is cancelled and queued with the S14 subclasses and S19 head look while the backtrack is active, and replayed through PacketUtil.receive on the flush conditions. Separately, an S18 for the target re-anchors realPosition to the absolute coordinates, keeping the distance gating (4.5/2.5 block thresholds) honest across teleports.

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

Vanilla hook: PacketReceiveEvent.
Holding a teleport client-side only delays the visual snap; the server state is unaffected. Flushing on hurtTime == 9 keeps the replay aligned with the player's damage timeline.
Variations: Not present in Rise 6.1.30's WatchdogVelocity corpus hit.
PacketReceiveEvent across all consumers; the Rise 5.99 anticheat consumes S18 inside PlayerData.handle.
Rise 6.x uses getX()/getY()/getZ() double accessors and divides by 32.0; Rise 5.99 and Sigma use the MCP-style func_149449_d/func_149451_c accessors; Tenacity reads getX() directly on the fixed-point ints (no /32), which is fine for the magnitude check. Only Rise 5.99 tracks ticksSinceLastTeleport as state.

anticheat Anti-Cheat Checks

S18 is the clientbound absolute-position correction for one entity, and server anticheats consume it on the send side as the reset point of entity state. Trackers re-anchor their replicated entity positions on it (Hydro, AntiHaxerman), teleport processors re-sync the player's own movement state when the teleport targets the checked player (Artemis, Frequency, BetterAnticheat), and the same packet is what makes reach verification and phase checks trust the server's entity locations. Because the packet is clientbound, no anticheat validates its contents; they only timestamp and consume it.

EntityTracker (teleport re-anchoring) (Incognitolol-Hydro)

Re-anchor the replicated position of a tracked entity when the server sends its absolute teleport, so reach checks keep measuring against the corrected location.

handleEntityTeleport wraps the ENTITY_TELEPORT packet in WrapperPlayServerEntityTeleport, looks up the entity, and applies handleTeleport(x, y, z) inside the transaction tracker's confirm-pre window, with confirm-post advancing all entity queues. The same tracker handles spawn, relative moves and destroy packets, so the entity map mirrors the full server-side entity stream.

Detects: Entity position desync after teleports; provides the corrected entity location used by Hydro's reach and combat checks.

Source: Incognitolol-Hydro, src/main/java/integral/studios/hydro/model/tracker/impl/EntityTracker.java

Variations: AntiHaxerman's EntityTracker sets the absolute coordinates the same way but keeps the vanilla epsilon check (0.03125 for x/z, 0.015625 for y) so micro-teleports keep the old position. Kauri's EntityTrackHandler interpolates the new absolute location with increment 3 instead of snapping.
TeleportPreProcessor (self entity teleport) (artemisac-artemis-minecraft-anticheat)

Treat an S18 targeting the checked player as a movement reset: rebuild the player's movement, location and rotation from the teleport coordinates on transaction confirm.

The processor matches GPacketPlayServerEntityTeleport, ignores it unless the entity id equals the player's own id, then schedules a transaction-confirmed action. The pre phase stores the last entity teleport, copies the current velocity into lastVelocity, rebuilds PlayerMovement and PlayerRotation from the teleport values, and sets processedEntityTeleport true; the post phase clears the flag.

Detects: Position desync caused by the server teleporting the player; the processedEntityTeleport flag lets downstream checks skip the teleport tick.

Source: artemisac-artemis-minecraft-anticheat, ac.artemis.core/src/main/java/ac/artemis/core/v4/processor/teleport/TeleportPreProcessor.java

Variations: Frequency's OutgoingPacketProcessor calls the action manager's onTeleport() for a self S18 without rebuilding movement state; BetterAnticheat's TeleportTracker queues the teleport and matches it against the player's next flying packet, flagging missed teleports.
OutgoingPacketProcessor (self teleport action) (ElevatedDev-Frequency, MinecraftUserHAN1110-FrequencyPlus, splatboydev-Degrade)

Detect when the server teleports the checked player and reset the action manager state so movement checks exempt the teleport tick.

On PacketPlayOutEntityTeleport the processor wraps the packet, and when the entity id matches the player it calls playerData.getActionManager().onTeleport(). The same processor feeds S12 velocity into the velocity manager for the self entity, and treats PacketPlayOutPosition as a teleport too.

Detects: Nothing by itself; it feeds the action manager that movement checks consult to exempt legitimate teleports.

Source: ElevatedDev-Frequency, src/main/java/xyz/elevated/frequency/processor/impl/OutgoingPacketProcessor.java

Variations: Identical copies ship in FrequencyPlus and Degrade. Artemis rebuilds full movement state for the same event; Frequency only resets the action flag.
EntityTracker (absolute teleport snap) (Tecnio-AntiHaxerman)

Snap a tracked entity's replicated position to the S18 absolute coordinates so reach and hitbox checks use the corrected server location.

On GPacketPlayServerEntityTeleport the tracker overwrites serverPosX/Y/Z with the absolute fixed-point values and computes the new position by dividing by 32.0, but only if at least one axis differs by more than the vanilla epsilon (0.03125 for x/z, 0.015625 for y); otherwise the current position is kept. The update runs inside a connection-confirm action, so it applies at the player's confirmed tick.

Detects: Entity position desync after teleports; the epsilon branch mirrors the vanilla client's micro-jitter suppression on repeated teleports.

Source: Tecnio-AntiHaxerman, src/main/java/me/tecnio/ahm/data/tracker/impl/EntityTracker.java

Variations: Hydro's EntityTracker snaps unconditionally; Kauri interpolates to the new location over three ticks. Both share the transaction-anchored application model.
TeleportTracker (teleport confirmation) (amnoah-BetterAnticheat)

Queue every teleport sent to the player, including S18 self teleports, and verify that the player's next flying packet rejoins the teleported position, rotation and ground state.

handlePacketPlaySend wraps ENTITY_TELEPORT for the player's own entity id into a Teleport record (position, rotation, relative flags, onGround) and adds it to eligibleTeleports when the confirmation begins. On each flying packet, match() compares onGround, then the absolute or relative position coordinate by coordinate, then rotation; a teleport still eligible at tick end sets missedTeleport. The strictness depends on whether the player sent a position in the previous tick (2.0E-4 leniency when not).

Detects: Teleport desync, clients that ignore or delay server teleports, and position spoofing that fails to rejoin the teleported location.

Source: amnoah-BetterAnticheat, core/src/main/java/better/anticheat/core/player/tracker/impl/teleport/TeleportTracker.java

Variations: Artemis and Frequency reset movement state on self teleports without verifying the rejoining position; BetterAnticheat's ArtificialPositionCheck consumes the missedTeleport signal to flag impossible position jumps.

Wiki Cross-Reference

The server sends this absolute-position correction when an entity moves far enough that relative deltas cannot represent it, documented in the current protocol as moves of more than 8 blocks.

MCP 1.8.9 S18PacketEntityTeleport implements Packet dispatching to INetHandlerPlayClient.handleEntityTeleport; wire serde is readPacketData/writePacketData via readBoolean, readByte, readInt, readVarIntFromBuffer.

1.8.9 callers: EntityTrackerEntry.? sends new S18PacketEntityTeleport (line 221) +1 more: 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.

Module Analyses Using S18PacketEntityTeleport

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