0x1D S1DPacketEntityEffect

Applies a status/potion effect to an entity.

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

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

entityeffectpotion
Comprehensive 8/8

Fields

FieldTypeDescription
entityIdVarInt
effectIdbytePotion effect ID
amplifierbyteEffect amplifier (0 = level 1, 1 = level 2, etc.)
durationVarIntDuration in ticks (20 ticks = 1 second)
hideParticlesbooleanWhether to hide ambient particles

Wire Encoding

FieldTypeNotes
Entity IDVarInt
Effect IDbyte
Amplifierbyte
DurationVarInt
Hide Particlesbool

MCP References

MCPNetHandlerPlayClient.handleEntityEffect()

Handler Interface

HNDINetHandlerPlayClient

Notes

Effect IDs: 1=speed, 2=slowness, 5=strength, 8=jump_boost, 11=absorption, 16=wither, etc.

Vanilla Source

S1DPacketEntityEffect.java100 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 S1DPacketEntityEffect implements Packet<INetHandlerPlayClient>
10
{
11
    private int entityId;
12
    private byte effectId;
13
    private byte amplifier;
14
    private int duration;
15
    private byte hideParticles;
16
17
    public S1DPacketEntityEffect()
18
    {
19
    }
20
21
    public S1DPacketEntityEffect(int entityIdIn, PotionEffect effect)
22
    {
23
        this.entityId = entityIdIn;
24
        this.effectId = (byte)(effect.getPotionID() & 255);
25
        this.amplifier = (byte)(effect.getAmplifier() & 255);
26
27
        if (effect.getDuration() > 32767)
28
        {
29
            this.duration = 32767;
30
        }
31
        else
32
        {
33
            this.duration = effect.getDuration();
34
        }
35
36
        this.hideParticles = (byte)(effect.getIsShowParticles() ? 1 : 0);
37
    }
38
39
    /**
40
     * Reads the raw packet data from the data stream.
41
     */
42
    public void readPacketData(PacketBuffer buf) throws IOException
43
    {
44
        this.entityId = buf.readVarIntFromBuffer();
45
        this.effectId = buf.readByte();
46
        this.amplifier = buf.readByte();
47
        this.duration = buf.readVarIntFromBuffer();
48
        this.hideParticles = buf.readByte();
49
    }
50
51
    /**
52
     * Writes the raw packet data to the data stream.
53
     */
54
    public void writePacketData(PacketBuffer buf) throws IOException
55
    {
56
        buf.writeVarIntToBuffer(this.entityId);
57
        buf.writeByte(this.effectId);
58
        buf.writeByte(this.amplifier);
59
        buf.writeVarIntToBuffer(this.duration);
60
        buf.writeByte(this.hideParticles);
61
    }
62
63
    public boolean func_149429_c()
64
    {
65
        return this.duration == 32767;
66
    }
67
68
    /**
69
     * Passes this Packet on to the NetHandler for processing.
70
     */
71
    public void processPacket(INetHandlerPlayClient handler)
72
    {
73
        handler.handleEntityEffect(this);
74
    }
75
76
    public int getEntityId()
77
    {
78
        return this.entityId;
79
    }
80
81
    public byte getEffectId()
82
    {
83
        return this.effectId;
84
    }
85
86
    public byte getAmplifier()
87
    {
88
        return this.amplifier;
89
    }
90
91
    public int getDuration()
92
    {
93
        return this.duration;
94
    }
95
96
    public boolean func_179707_f()
97
    {
98
        return this.hideParticles != 0;
99
    }
100
}

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

Deep Dive

Role in the protocol

S1DPacketEntityEffect applies one potion effect to one entity. The server has three send sites: EntityTrackerEntry broadcasts an entity's new effect to every player watching it, EntityPlayerMP.addPotionEffect and refreshActivePotionEffect send it to the affected player directly, and ServerConfigurationManager replays effects (beacon, team) on respawn and on player join. Wire layout is entityId VarInt, effectId byte, amplifier byte, duration VarInt in ticks, hideParticles boolean. In 1.8.9 the effect is a full state push: the client stores it in the entity's active potion map and the server never asks for confirmation.

Vanilla handling

NetHandlerPlayClient.handleEntityEffect runs on the client thread via PacketThreadUtil, resolves the entity with getEntityByID, and for EntityLivingBase targets builds a PotionEffect(effectId, duration, amplifier, false, hideParticles), calls setPotionDurationMax(duration), then addPotionEffect. From that point every renderer (armor, HUD, particles, the player's own effect tab) reads the entity's activePotionMap. Effects on non-living entities are silently dropped, and an unknown entityId does nothing.

Why clients touch it

The 8 reference clients leave S1D to vanilla; the only non-vanilla hit among them is Rise 6.1.30 and 6.2.4 NetworkAPI.java, which registers S1DPacketEntityEffect in the clientbound class table (index 72) so scripts can build and inject it via receivePacket. Effect-aware features in those clients (effect HUD rows, potion ESP) poll the entity's active potion map after vanilla applies the packet, or render from EntityLivingBase state, so no packet interception is needed. November Recode 2.0 is the exception: AutoPotModule hooks S1D as the server's implicit confirmation that a thrown splash potion landed, resetting its potion sequence only when the effect packet for the local player arrives. The PotionHUD/AntiPotion entries in older packet docs come from Sigma 3.9, which is not part of the reference set; Sigma 4.11's corpus has no S1D hit.

Exploit surface

Cancelling S1D in a receive event is a client-side potion bypass: the server keeps applying the effect and its movement math, the client simply never renders or stores it. That grants nothing for movement because speed, jump and health attributes are server-authoritative. Anti-cheats never measure this packet; it is one-directional cosmetic state. The only bandwidth note is that EntityTrackerEntry sends one S1D per effect per tracked entity on the tracking loop, so rapid effect churn is amplification surface for griefing plugins, not for cheat modules.

Server-Side Handling

EntityTrackerEntry line 418 sends S1D to each playerNetServerHandler in the watching list when a tracked entity gains an effect; EntityPlayerMP lines 922/927 send it to the affected player for addPotionEffect and refreshActivePotionEffect; ServerConfigurationManager lines 193/509 replay active effects on respawn and join. The server does no validation on the receiving side: there is no processX handler because the packet is clientbound only.

Protocol Analysis

The amplifier byte is the level minus one (0 means level I). Duration is in ticks on the wire; the client stores it as the effect duration and also as durationMax, so the potion icon countdown and the expiry timestamp both come from this single value. hideParticles maps to the PotionEffect showParticles flag; an S1D with the same effectId overwrites the previous entry in the active potion map rather than stacking.

Anti-Cheat Landscape

No anti-cheat in the 1.8.9 ecosystem flags S1D handling. Movement-relevant effects (speed, jump boost, slowness) are validated from server-side attribute and motion math, so a client that drops the packet only sees wrong visuals. Servers that want to detect a modified client would have to query the client for its potion state, which vanilla 1.8.9 has no packet for.

implementation Implementation Cases

Effect application is a pure server-to-client state push. The 8 reference clients have no module interest in it and every effect-aware feature reads the entity's potion map after vanilla applies the packet; the sole non-vanilla hit among them is Rise 6.x NetworkAPI registering the class for script injection. November Recode 2.0's AutoPotModule is the only module that hooks S1D, using it as the ack that a splash potion actually applied.

AutoPotModule (pot confirmation) (November Recode 2.0)

Use the S1D effect packet for the local player as the server-side confirmation that a thrown splash potion landed, so the potion sequence only advances after the effect applies.

The potion sequence is staged: C09 held-item change, C08 block placement for the throw, then the module sets waitingClientUpdate and waits. The S1D listener checks the packet's entity id against the local player; while waitingClientUpdate is set it resets the pot stage, restarts the delay timer and re-syncs the inventory, scheduling the next pot.

Source: November Recode 2.0, feature/module/impl/combat/AutoPotModule.java

Vanilla hook: EventPacket.In (S1D branch), EventUpdate (sequence driver).
None: the module only reads S1D. The effect arrives for any potion the server applies, so the ack also fires when a server-side effect lands, which only makes the sequence more robust.
Variations: No other client in the reference corpus hooks S1D at module level; effect-aware features elsewhere poll the active potion map instead.
The only module in the reference corpus registering a packet receive handler for S1D is November Recode 2.0's AutoPotModule (EventPacket.In). Rise 6.x NetworkAPI exposes clientbound packets to JavaScript scripts by class-table index.
Memeware 7.3, Nekoware v1 private, Sigma 4.11, Spicy and Tenacity 6.0 ship the vanilla handler byte-for-byte. Rise 6.1.30 and 6.2.4 additionally register the class in NetworkAPI (script/api/NetworkAPI.java). November Recode 2.0 is the only client that reads S1D in a module, inside AutoPotModule's EventPacket.In listener.

anticheat Anti-Cheat Checks

Server-side anticheats treat the entity-effect packet as state synchronization, not a cheat signal. The corpus splits into packet-driven potion trackers (Grim, Artemis, BetterAnticheat, Kauri, Intave) that decode S1D and mirror the effect onto their simulated player or entity, and Bukkit-polling checks (FlopAC, Hydro, Frequency) that read getActivePotionEffects and only see the effect after the server applies it. The trackers matter because movement checks must know the exact speed, jump and slowness multipliers the client has; a potion state mismatch causes false flags in speed and flight checks, so the apply packet is transaction-confirmed before the effect lands in the simulation.

Effect state replication (Grim) (GrimAnticheat-Grim)

Keep the compensated entity's potion state in sync with the server so movement predictions apply the same speed, jump and slowness multipliers the client sees.

PacketEntityReplication listens on the packet-send side. For ENTITY_EFFECT it decodes the potion type and amplifier, cancels the packet when ViaVersion would fake an effect the client version does not support, forces a transaction when the effect targets the player, and schedules entity.addPotionEffect on the compensated entity at the transaction's real-time position. The remove branch in the same listener mirrors this with entity.removePotionEffect.

Detects: No cheat directly. It is state replication: speed, jump boost and levitation modifiers on the simulated entity must match the client's, or flight and speed checks misjudge legitimate motion.

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

Variations: Artemis (PotionPreProcessor, EmulatorPreProcessor) and BetterAnticheat (PotionTracker) use the same transaction-confirmed pattern; Kauri's PotionHandler adds the effect into a thread-safe list; Intave decodes the fields with EntityEffectReader.
Potion preprocessor (Artemis) (artemisac-artemis-minecraft-anticheat)

Maintain the user's active effect list from the entity-effect packet so checks and the emulator can read current potion modifiers.

fastHandle matches GPacketPlayServerEntityEffect, builds a PotionEffect from the effect id, duration and amplifier, then queues the add behind a transaction confirmation: pre() inserts the effect and marks it processed, post() clears the marker. It also clears the using-item flag when the effect ends item use.

Detects: Nothing directly; it feeds checks that must distinguish potion-boosted motion from cheat motion.

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

Variations: The same anticheat's EmulatorPreProcessor applies the identical pattern to the emulated entity; Grim and BetterAnticheat use equivalent confirmations.
Potion tracker (BetterAnticheat) (amnoah-BetterAnticheat)

Track each potion type's amplifier and duration as a lag-compensated many-state so checks read the effect that actually reached the client.

PotionTracker subscribes to ENTITY_EFFECT on the send side, takes a confirmation handle, and stages the new Potion in an ObjectManyState: addNew on begin, flushOld plus an active-count after the client confirms. REMOVE_ENTITY_EFFECT stages an EMPTY_POTION the same way so an expired effect cannot linger.

Detects: Nothing by itself; getPotion() exposes the confirmed state to checks that need the speed or jump modifier.

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

Variations: Grim and Artemis use transaction confirmations rather than a confirmation tracker; FlopAC polls Bukkit's getActivePotionEffects instead of reading the packet.
Potion handler (Kauri) (funkemunky-KauriV3)

Keep a thread-safe potion effect list on the player data so movement and velocity checks can query current modifiers.

PotionHandler seeds the list from the Bukkit player's active effects at construction, then onPotionEffect(WrapperPlayServerEntityEffect) replaces the entry for the potion type under a write lock, storing the amplifier, duration and visibility flags. hasPotionEffect and getEffectByType expose the state to checks.

Detects: Nothing directly; the handler is the query surface for checks that must subtract potion-boosted motion from the allowed envelope.

Source: funkemunky-KauriV3, Anticheat/src/main/java/dev/brighten/ac/handler/PotionHandler.java

Variations: Artemis and Grim decode the packet into their own effect model; Tecnio whitelists both effect packets in NetworkFilter and tracks potion levels in AttributeTracker.
Entity effect reader (Intave) (intave-intave)

Extract effect type, amplifier and duration from the entity-effect packet across every supported protocol version.

EntityEffectReader is registered for the ENTITY_EFFECT packet in PacketReaders. effectType() reads the potion-type field on 1.19+, the integer slot on 1.18.2, and the legacy byte below; effectAmplifier() and effectDuration() shift their field indexes at 1.21. Each accessor falls back to 0 on a missing field.

Detects: Nothing by itself; the reader feeds the effect tracker that movement characteristics consume.

Source: intave-intave, src/main/java/de/jpx3/intave/packet/reader/EntityEffectReader.java

Variations: Grim and Artemis read the same fields through PacketEvents and the cc.ghast wrapper tree instead of ProtocolLib.

Wiki Cross-Reference

The client displays the effect level as amplifier plus one, so amplifier 0 means level 1.

MCP 1.8.9 S1DPacketEntityEffect implements Packet dispatching to INetHandlerPlayClient.handleEntityEffect; wire serde is readPacketData/writePacketData via readByte, readVarIntFromBuffer.

1.8.9 callers: EntityTrackerEntry.? sends new S1DPacketEntityEffect (line 452) +2 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.