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

0.15 unleash/leash entities

Comments in 'Resources' started by Tim // robske Büba, Jun 25, 2016.

  1. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    Hello there!
    I don't want to talk to much let's just get to the code:

    PM itself:
    Leash $player to $entEID
    PHP:
    $pk = new SetEntityDataPacket();
    $pk->eid 0;
    $pk->metadata = [Entity::DATA_LINKED_EID => [Entity::DATA_TYPE_LONG$entEID],
    24 => [Entity::DATA_TYPE_BYTE1]];
    $player->dataPacket($pk);
    Unleash $player from $entEID
    PHP:
    $pk = new SetEntityDataPacket();
    $pk->eid 0;
    $pk->metadata = [Entity::DATA_LINKED_EID => [Entity::DATA_TYPE_LONG$entEID],
    24 => [Entity::DATA_TYPE_BYTE0]];
    $player->dataPacket($pk);

    Most PM forks:
    Leash $player to $entEID
    PHP:
    $pk = new SetEntityDataPacket();
    $pk->eid 0;
    $pk->metadata = [Entity::DATA_LEAD_HOLDER => [Entity::DATA_TYPE_LONG$entEID],
    Entity::DATA_LEAD => [Entity::DATA_TYPE_BYTE1]];
    $player->dataPacket($pk);
    Unleash $player from $entEID
    PHP:
    $pk = new SetEntityDataPacket();
    $pk->eid 0;
    $pk->metadata = [Entity::DATA_LEAD_HOLDER => [Entity::DATA_TYPE_LONG$entEID],
    Entity::DATA_LEAD => [Entity::DATA_TYPE_BYTE0]];
    $player->dataPacket($pk);
    SOFe likes this.
  2. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    • Define $player
    • Define $entEID
    • Define "Most PM forks"
  3. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    $player = Player object
    $entEID = entityId of an entity
    Most PM forks: CS, Genisys
    Last edited: Jul 19, 2016
  4. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    There does not exist something called PlayerObject. There indeed exists "Player" or the phrase "Player object", but PlayerObject, used as one word, implies that there exists a term, a type or a component called PlayerObject, which is not true.
  5. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    Sorry i just love writingThingsLikeThis, maybe because i like variable names. Edited.

Share This Page

Advertisement