can someone help me by a question... i spawn an entity like a zombie with nametag and set it invisible... how its possible that the entity with nametag is flying in the air and dont fall down to earth? i want to create a flying text with an entity but all the time the entity drops down (and the nametag as well) and dont know how to disable this falling feature ps. 1- i dont want to do it with floating text 2- many lines in nametag is an idea but players can push the entity away so the nametag as well... Can someone say me how to disable falling down or how to use the "onCollisionWith" Event?
What's wrong with FloatingTextParticle? The pushing thing is client-side. You can't disable it unless you keep teleporting it back.
FloatingTextParticle is the most convenient way. And you can't prevent zombies from being pushed away. Use an ID 0 DroppedItem - that's the best way to spawn an invisible entity without making it invisible.
FloatingTextParticle is the most convenient way. <--- sure but i dont like FloatingTextPaticle xD dont ask me why ^^ thats a good idea and i can set an invisible block under it that its not falling down... thats a way...i will try it...
Oh, just remembered, set NoAI to 1. Example spawning code: PHP: public function spawnTo(Player $player){ $pk = new AddEntityPacket(); $pk->eid = $this->getId(); $pk->type = self::NETWORK_ID; $pk->x = $this->x; $pk->y = $this->y; $pk->z = $this->z; $pk->nametag = "Hi"; $pk->speedX = $this->motionX; $pk->speedY = $this->motionY; $pk->speedZ = $this->motionZ; $pk->yaw = $this->yaw; $pk->pitch = $this->pitch; $pk->metadata = [ Entity::DATA_NO_AI => [Entity::DATA_TYPE_BYTE, 1] ]; $player->dataPacket($pk->setChannel(Network::CHANNEL_ENTITY_SPAWNING)); parent::spawnTo($player); }