0x1D S1DPacketEntityEffect
Applies a status/potion effect to an entity.
Fields
| Field | Type | Description |
|---|---|---|
| entityId | VarInt | |
| effectId | byte | Potion effect ID |
| amplifier | byte | Effect amplifier (0 = level 1, 1 = level 2, etc.) |
| duration | VarInt | Duration in ticks (20 ticks = 1 second) |
| hideParticles | boolean | Whether to hide ambient particles |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Entity ID | VarInt | |
| Effect ID | byte | |
| Amplifier | byte | |
| Duration | VarInt | |
| Hide Particles | bool |
MCP References
MCP
NetHandlerPlayClient.handleEntityEffect()Handler Interface
HND
INetHandlerPlayClientNotes
Effect IDs: 1=speed, 2=slowness, 5=strength, 8=jump_boost, 11=absorption, 16=wither, etc.
implementation Implementation Cases
PotionHUD
(Sigma 3.9, Tenacity 6.0)
Detect potion effects applied to entities. PotionHUD shows active effects. AntiPotion cancels negative effects.
if (event.getPacket() instanceof S1DPacketEntityEffect) {
S1DPacketEntityEffect s1d = (S1DPacketEntityEffect) event.getPacket();
if (s1d.getEntityId() == mc.thePlayer.getEntityId() && isNegativeEffect(s1d.getEffectId()))
event.setCancelled(true);
}AntiPotion
(Sigma 3.9, Tenacity 6.0)
Detect potion effects applied to entities. PotionHUD shows active effects. AntiPotion cancels negative effects.
if (event.getPacket() instanceof S1DPacketEntityEffect) {
S1DPacketEntityEffect s1d = (S1DPacketEntityEffect) event.getPacket();
if (s1d.getEntityId() == mc.thePlayer.getEntityId() && isNegativeEffect(s1d.getEffectId()))
event.setCancelled(true);
}