Skip to content
mc-protocol
Esc
↑↓navigate↵open⌘Jpreview
On this page

Update Mob Effect

Play 0x84, server → client.

play · 0x84 · clientbound (server → client)

Applies or refreshes a status effect on an entity. flags control ambient, particle and icon visibility, and whether the effect is blended. The server sends it when an effect is added or changed; the client renders particles and the HUD icon.

Sent by the server, read by the client. Listen for it with client.on("UpdateMobEffect", (data) => …) on the receiving side.

Fields

Field Type Notes
entityId VarInt
effectId VarInt
amplifier VarInt
duration VarInt
flags UByte

Send it

import { helpers } from "mc-protocol";

// Speed II for 10 seconds, with the HUD icon but no particles.
await client.sendPacket("UpdateMobEffect", {
  entityId: 42,
  effectId: 1,
  amplifier: 1,
  duration: 200,
  flags: helpers.mobEffectFlags(["showIcon"]),
});

effectId is the minecraft:mob_effect registry ID. flags is one byte: ambient 0x01, showParticles 0x02, showIcon 0x04, blend 0x08. See Packet flags.

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: src/Core/Versions/776/Packets/play/clientbound/UpdateMobEffect.ts

Was this page helpful?