Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Spawn Mob Entity

Comments in 'Plugin Development' started by Flabe, Jan 13, 2016.

  1. Flabe
    Offline

    Flabe Active Member

    Joined:
    Nov 17, 2015
    Posts:
    147
    Minecraft User:
    Flabe231
    Hi guys , I have some problems with spawning Enderman Entity(I want to spawn Enderman that follows command sender)
  2. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    Look at Slapper's source code.
    jojoe77777, MichaelM04 and Vaivez66 like this.
  3. wolfdale
    Offline

    wolfdale Active Member Plugin Developer

    Joined:
    Dec 3, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    ace
    There is no AI so, the enderman would just stand there...
    PHP:
    $nbt =  new Compound("",[
                new 
    Enum("Pos",[
                    new 
    Double("",$player->x),
                    new 
    Double("",$player->y),
                    new 
    Double("",$player->z),
                    ]),
                new 
    Enum("Motion", [
                    new 
    Double("",0),
                    new 
    Double("",0),
                    new 
    Double("",0),
                    ]),
                new 
    Enum("Rotation",[
                    new 
    Float("",$player->yaw),
                    new 
    Float("",$player->pitch),
                    ])
                ]);
    $level->createEntity("Enderman",$player->chunk$nbt)->spawnToAll();

Share This Page

Advertisement