13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
22 public const NETWORK_ID = ProtocolInfo::LEVEL_EVENT_PACKET;
26 public int $eventData;
27 public ?
Vector3 $position =
null;
35 $result->eventData = $eventData;
36 $result->position = $position;
40 public static function standardParticle(
int $particleId,
int $data,
Vector3 $position) : self{
41 return self::create(
LevelEvent::ADD_PARTICLE_MASK | $particleId, $data, $position);
45 $this->eventId = $in->getVarInt();
51 $out->putVarInt($this->eventId);
57 return $handler->handleLevelEvent($this);
static create(int $eventId, int $eventData, ?Vector3 $position)
decodePayload(PacketSerializer $in)
handle(PacketHandlerInterface $handler)
encodePayload(PacketSerializer $out)
putVector3Nullable(?Vector3 $vector)