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

Level Particles

Play 0x2F, server → client.

play · 0x2F · clientbound (server → client)

Spawns amount particles of type particle at the given position, spread by the offsets and given a velocity from velocityOffset. longDistance raises the visible range from 32 to 512 blocks and alwaysShow forces display regardless of particle settings. The client renders the particles.

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

Fields

Field Type Notes
longDistance Boolean
alwaysShow Boolean
x Double
y Double
z Double
offsetX Float
offsetY Float
offsetZ Float
velocityOffset Float
amount Int
particle Particle

Send it

import { helpers } from "mc-protocol";

// 20 flames spread around a point.
await client.sendPacket("LevelParticles", helpers.createParticlePacket("flame", { x: 0.5, y: 65, z: 0.5 }, {
  count: 20,
  offset: 0.5,
  speed: 0.1,
}));

// Particles with data take their options by name.
await client.sendPacket("LevelParticles", helpers.createParticlePacket(
  helpers.createParticle("dust", { color: "#ff8800", scale: 1.5 }),
  { x: 0.5, y: 66, z: 0.5 },
));

particle is a Particle: a registry name plus type-specific data. See Particles for every payload.

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

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

Was this page helpful?