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

How to spawn entity?

Discussion in 'Help' started by Swade, Aug 21, 2020.

  1. Swade

    Swade Creeper

    Messages:
    1
    GitHub:
    swade
    Hello, how to spawn entity pocketmine I do not know anything spawn entity
     
  2. GodWeedZao

    GodWeedZao Zombie Pigman

    Messages:
    401
    GitHub:
    godweedzao
    1) learn php
    2) see about register::entity in pmmp lib
    3) if im not helped wait for other people
     
  3. RicardoMilos384

    RicardoMilos384 Slime

    Messages:
    82
    GitHub:
    ricardomilos384
    PHP:
    $nbt Entity::createBaseNBT($pos);
    $entity Entity::createEntity($entityIds/$entityClass$level$nbt);
    $entity->spawnToAll();
     
  4. GodWeedZao

    GodWeedZao Zombie Pigman

    Messages:
    401
    GitHub:
    godweedzao
    oh wait you edited thread? why!
    first register entity in onEnable ev and spawn in other fuctions (i mean you can spawn in InteractEvent or what ever you want)
    use his code to spawn :
     
  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.