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

Sitting Skeleton(Packet

Comments in 'Plugin Development' started by shigo, Aug 31, 2016.

  1. shigo
    Offline

    shigo New Member

    Joined:
    May 7, 2016
    Posts:
    3
    Minecraft User:
    shigo
    so i want to add Sitting Skeleton
    I was trying this code but this doesnt work

    Please tell me how to add Sitting Skeleton!
    PHP:
    $player $event->getPlayer();
    $pk = new AddEntityPacket();
    $pk->eid 114514;
    $pk->type 34;
    $pk->$player->x;
    $pk->$player->y;
    $pk->$player->z;
    $pk->speedX 0;
    $pk->speedY 0;
    $pk->speedZ 0;
    $pk->yaw 0;
    $pk->pitch 0;
    $pk->meta 0;
    $pk->metadata = [Entity::DATA_FLAGS => [Entity::DATA_TYPE_BYTE,<< Entity::DATA_FLAG_RIDING]];
    Server::broadcastPacket(Server::getInstance()->getOnlinePlayers(),$pk);
    $pk = new SetEntityLinkPacket();
    $pk->from 114514;
    $pk->to $player->getId();
    $pk->type 1;
    Server::broadcastPacket(Server::getInstance()->getOnlinePlayers(),$pk);
  2. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    Why do you hardcode 114514? Use Entity::$entityCount++.
    applqpak likes this.

Share This Page

Advertisement