I have custom animation in my server resource pack. I know that I have to use AnimateEntityPacket, but again, I don't know how. My Attempt: PHP: foreach($this->main->getServer()->getLevelByName("AdventureSurvival-Quest-AlongTimeAgo")->getEntities() as $entity){ if($entity->getNameTag() === "§9Nightlight"){ $pk = new AnimateEntityPacket; $pk->create("animation.npc.wave_nosound", $pk->getNextState(), $pk->getStopExpression(), $pk->getController(), $pk->getBlendOutTime(), [$entity->getId()]); $this->main->getServer()->broadcastPacket($pk); } }
PHP: public function onRun(int $currentTick){ foreach (Server::getInstance()->getLevels() as $level) { foreach($level->getEntities() as $NPC) { if ($NPC instanceof TestEntity) { foreach (NPC::$emotes as $emote => $id) { Server::getInstance()->broadcastPacket($NPC->getViewers(), EmotePacket::create($NPC->getId(), $id, 1 << 0)); } } } } } It should seem to work