I created an entity at a specific point, and then I set it on motion. But after I set it on motion, it's position that i get from it is still the position that i created it, not the position after i set it on motion. Help!
PHP: $player = $p; $nbt = new CompoundTag(); $nbt->Pos = new ListTag("Pos",[ new DoubleTag ( "", $player->x ), new DoubleTag ( "", $player->y + $player->getEyeHeight () ), new DoubleTag ( "", $player->z ) ]); $nbt->Motion = new ListTag ( "Motion", [ new DoubleTag ( "", - \sin ( $player->yaw / 180 * M_PI ) *\cos ( $player->pitch / 180 * M_PI ) ), new DoubleTag ( "", - \sin ( $player->pitch / 180 * M_PI ) ), new DoubleTag ( "",\cos ( $player->yaw / 180 * M_PI ) *\cos ( $player->pitch / 180 * M_PI ) ) ] ); $nbt->Rotation = new ListTag ( "Rotation", [ new FloatTag ( "", $player->yaw ), new FloatTag ( "", $player->pitch ) ] ); $nbt->Size = new IntTag("Size",0); $speed = 3.0; $slime = Entity::createEntity ( "Slime", $player->chunk, $nbt, $player ); $slime->setMotion($slime->getMotion()->multiply($speed)); $slime->spawnToAll ();