0x1E S1EPacketRemoveEntityEffect

Removes a potion effect from an entity.

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

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

entitypotioneffect
Complete 6/8

Fields

FieldTypeDescription
entityIdVarIntEntity ID
effectIdbytePotion effect ID

Wire Encoding

FieldTypeNotes
Entity IDVarInt
Effect IDbytePotion ID

MCP References

MCPNetHandlerPlayClient.handleRemoveEntityEffect()

Handler Interface

HNDINetHandlerPlayClient

Vanilla Source

S1EPacketRemoveEntityEffect.java59 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.network.Packet;
5
import net.minecraft.network.PacketBuffer;
6
import net.minecraft.network.play.INetHandlerPlayClient;
7
import net.minecraft.potion.PotionEffect;
8
9
public class S1EPacketRemoveEntityEffect implements Packet<INetHandlerPlayClient>
10
{
11
    private int entityId;
12
    private int effectId;
13
14
    public S1EPacketRemoveEntityEffect()
15
    {
16
    }
17
18
    public S1EPacketRemoveEntityEffect(int entityIdIn, PotionEffect effect)
19
    {
20
        this.entityId = entityIdIn;
21
        this.effectId = effect.getPotionID();
22
    }
23
24
    /**
25
     * Reads the raw packet data from the data stream.
26
     */
27
    public void readPacketData(PacketBuffer buf) throws IOException
28
    {
29
        this.entityId = buf.readVarIntFromBuffer();
30
        this.effectId = buf.readUnsignedByte();
31
    }
32
33
    /**
34
     * Writes the raw packet data to the data stream.
35
     */
36
    public void writePacketData(PacketBuffer buf) throws IOException
37
    {
38
        buf.writeVarIntToBuffer(this.entityId);
39
        buf.writeByte(this.effectId);
40
    }
41
42
    /**
43
     * Passes this Packet on to the NetHandler for processing.
44
     */
45
    public void processPacket(INetHandlerPlayClient handler)
46
    {
47
        handler.handleRemoveEntityEffect(this);
48
    }
49
50
    public int getEntityId()
51
    {
52
        return this.entityId;
53
    }
54
55
    public int getEffectId()
56
    {
57
        return this.effectId;
58
    }
59
}

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

Deep Dive

Role in the protocol

S1EPacketRemoveEntityEffect clears one effect from one entity. The only server send site in the corpus is EntityPlayerMP.removePotionEffect, which fires when an effect expires naturally, is cured (milk), is overwritten by a higher-tier re-application, or is stripped on death/respawn. Wire layout is entityId VarInt plus effectId byte. It is the mirror image of S1D: where S1D pushes a full PotionEffect, S1E carries only the potion ID and the client derives everything else from its stored effect.

Vanilla handling

NetHandlerPlayClient.handleRemoveEntityEffect resolves the entity and calls removePotionEffectClient(effectId) on EntityLivingBase. That deletes the map entry, re-applies the entity's attribute modifiers (an expired speed effect removes its movement bonus) and triggers the potion expiry render path. The HUD and effect icons update from the map, so removal needs no separate notification. Unknown entity IDs and unknown effect IDs are ignored without error.

Why clients touch it

No module in the 8 reference clients hooks S1E. The only non-vanilla corpus hit is the Rise 6.1.30/6.2.4 NetworkAPI registration (clientbound index 73) for script use. Effect-removal timing is irrelevant to these clients: HUDs redraw from the entity's potion map, and nothing needs to know the exact tick an effect ended because the client never sends effect state back to the server.

Exploit surface

Cancelling S1E in a receive event leaves the effect visible client-side while the server has already removed it. Because attributes are re-derived server-side, the client keeps stale visuals only: a cancelled speed-removal leaves the speed icon but not the speed, which is the classic tell of a sloppy client-side potion bypass. Anti-cheats ignore the packet entirely; the abuse surface is purely cosmetic and self-reporting.

Server-Side Handling

EntityPlayerMP line 932 sends S1E to the affected player whenever removePotionEffect is called on the server-side entity. EntityTrackerEntry does not broadcast removals to watchers in 1.8.9: other players learn about the change through the next attribute or metadata update, which is why effect removal is a per-player packet. There is no server-side inbound handler, as the packet is clientbound.

Protocol Analysis

Two fields only: entityId VarInt and effectId byte, no duration, no amplifier, no flags. The client must have received the matching S1D earlier; an S1E for an effect never applied is a no-op. Ordering relative to S1D matters: a remove arriving before the apply is silently dropped, so the effect sticks until its natural expiry.

Anti-Cheat Landscape

Nothing flags S1E. Movement effects are enforced from server-side state, so a client that ignores removals can never outrun the server's speed model. Plugin-side detection would require a client state query that 1.8.9 does not define.

implementation Implementation Cases

Effect removal is a two-field state push with zero module usage across the 8 reference clients. The only non-vanilla reference is Rise 6.x NetworkAPI registering the class for scripts; everything else is the vanilla handler.

None of the 8 clients register a packet receive handler for S1E. Rise 6.x exposes the class through NetworkAPI's clientbound table for script injection only.
Memeware 7.3, Nekoware v1 private, Sigma 4.11, Spicy and Tenacity 6.0 keep the vanilla handler. Rise 6.1.30/6.2.4 add the NetworkAPI registration; no other client code touches the packet.

anticheat Anti-Cheat Checks

The remove-effect packet is the mirror image of S1D: it deletes one potion from one entity. Anticheats that replicate effect state on the server (Grim, Artemis, BetterAnticheat) handle it in the same tracker as the apply packet, with the same transaction confirmation, because an effect that outlives its removal in the simulation keeps inflating the allowed speed and jump envelope. Tecnio whitelists both effect classes in its network filter so the pipeline can route them. No anticheat flags S1E directly: the packet carries only an entity id and an effect id, and the interesting state change happens on the entity, not in the packet.

Remove-effect replication (Grim) (GrimAnticheat-Grim)

Drop the potion from the compensated entity at the tick the client processes the removal, so the simulation stops crediting the effect's speed or jump bonus.

The REMOVE_ENTITY_EFFECT branch of PacketEntityReplication decodes the entity id and potion type, forces a transaction when the removal targets the player, and schedules entity.removePotionEffect at the transaction's real-time position. The apply branch in the same listener mirrors the add.

Detects: No cheat directly. A removal that lands late in the simulation keeps the effect's multipliers active too long and desyncs flight and speed checks.

Source: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/events/packets/PacketEntityReplication.java

Variations: Artemis EmulatorPreProcessor and PotionPreProcessor remove the effect from the emulated entity and user list with the same transaction confirmation; BetterAnticheat stages an EMPTY_POTION in the many-state.
Effect removal on emulated entity (Artemis) (artemisac-artemis-minecraft-anticheat)

Remove the potion from the emulated entity so the prediction engine stops applying the effect's movement modifiers.

EmulatorPreProcessor matches GPacketPlayServerEntityEffectRemove for the local player, then confirmFunctionAndTick queues data.entity.removePotionEffect(effectId) to run at the transaction-confirmed tick.

Detects: Nothing directly; it keeps the emulated entity's potion state identical to the client's so predictions of speed and jump stay valid.

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

Variations: Grim and BetterAnticheat implement the same removal with their own confirmation mechanisms; the sibling PotionPreProcessor tracks the user-level effect list instead of the emulated entity.
Potion removal tracker (BetterAnticheat) (amnoah-BetterAnticheat)

Transition the potion state to empty on removal, under the same confirmation as the apply path.

On REMOVE_ENTITY_EFFECT for the local player, PotionTracker stages EMPTY_POTION into the potion map on confirmation begin and flushes the old active state after confirm, so getPotion() returns an inactive state as soon as the client receives the removal.

Detects: Nothing by itself; checks reading the potion map stop applying the effect's modifiers after the removal confirms.

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

Variations: Grim removes the effect directly from the compensated entity; Artemis tracks the user effect list and the emulated entity in two processors.
Effect packet filter (Tecnio) (Tecnio-AntiHaxerman)

Whitelist both entity-effect packets in the network filter so the pipeline can route them to the attribute tracker.

NetworkFilter's constructor adds GPacketPlayServerEntityEffect and GPacketPlayServerEntityEffectRemove to the allowed-class set. isAllowed gates packet processing, so these two clientbound classes pass into the tracker layer while unlisted packets are ignored.

Detects: Nothing directly; the filter is the routing table that lets potion state reach checks.

Source: Tecnio-AntiHaxerman, src/main/java/me/tecnio/ahm/listener/network/NetworkFilter.java

Variations: Other anticheats subscribe to the packets directly through their event systems and need no explicit whitelist.

Wiki Cross-Reference

Clientbound 0x1E: VarInt entityId plus unsigned byte potion effect ID.

Mirror of S1D apply; client drops the stored effect and refreshes attributes and HUD.

Unknown entity or effect ID is ignored; remove before apply is a no-op.

MCP 1.8.9 S1EPacketRemoveEntityEffect implements Packet dispatching to INetHandlerPlayClient.handleRemoveEntityEffect; wire serde is readPacketData/writePacketData via readUnsignedByte, readVarIntFromBuffer.

1.8.9 callers: EntityPlayerMP.onFinishedPotionEffect sends new S1EPacketRemoveEntityEffect (line 1061): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/player/EntityPlayerMP.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.