1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Set entity on player's head

Discussion in 'Development' started by Gritty, Mar 16, 2020.

  1. Gritty

    Gritty Creeper

    Messages:
    1
    Hello i want to set an entity on player's head but i dont know how can anyone help me?
     
  2. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    PHP:
    $entity Entity::createEntity($entityId$levelEntity::createBaseNBT($player->add(0$player->getEyeHeight()), new Vector3()));
    $entity->spawnToAll();
     
    HimbeersaftLP likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.