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

Solved How to make a player sit?

Comments in 'Plugin Development' started by Hotshot_9930, Mar 30, 2016.

  1. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    How do I put a player in a sitting position, as if they were riding a minecart?
    applqpak, Muqsit and Primus like this.
  2. MCUnderground
    Offline

    MCUnderground New Member

    Joined:
    Feb 6, 2016
    Posts:
    10
    Minecraft User:
    MCUnderground
    If you want sitting on stairs you could make when stairs are placed then on same x,y,z place non visible and non movable minecart. May work
  3. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    Im not trying to make sitting stairs. Im making gokarts(using minecarts) but i dont know how to make the player sit.
    Legoboy0215 and applqpak like this.
  4. MCUnderground
    Offline

    MCUnderground New Member

    Joined:
    Feb 6, 2016
    Posts:
    10
    Minecraft User:
    MCUnderground
  5. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    applqpak likes this.
  6. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    Last edited: Mar 30, 2016
    Omar2s2 and Ritch like this.
  7. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    Also, how do i define metadata in an AddEntityPacket()? Im trying to spawn a minecart:
    PHP:
            $pk = new AddEntityPacket();
            
    $pk->eid $this->getId();
            
    $pk->type 84;
            
    $pk->$player->x;
            
    $pk->$player->y;
            
    $pk->$player->z;
            
    $pk->metadata =
            [
            
    // Idk what to put here
            
    ];
            foreach(
    $this->getPlayer()->getLevel()->getPlayers() as $p) {
                
    $p->dataPacket($pk);
            }
    Any help would be appreciated
    Last edited: Mar 31, 2016
    applqpak likes this.
  8. jojoe77777
    Offline

    jojoe77777 Notable Member Plugin Developer

    Joined:
    May 28, 2015
    Posts:
    653
    Plugins:
    1
    Minecraft User:
    jojoe77777
    You can leave it as an empty array if you don't need to customise things like name, name visibility, NoAI etc. But if you do want to, I would suggest looking at one of the entity classes in Slapper.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Same as dataProperties.
    https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/entity/Entity.php#L113
    Hotshot_9930 likes this.
  10. domybest
    Offline

    domybest New Member

    Joined:
    Dec 18, 2015
    Posts:
    7
    Minecraft User:
    Riceball_bro
    Hotshot_9930 likes this.
  11. Muqsit
    Offline

    Muqsit Active Member

    Joined:
    Sep 9, 2015
    Posts:
    175
    Minecraft User:
    Muqsit
    Hotshot_9930 likes this.
  12. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    Thanks to all who helped, the plugin is working perfectly now :)
    Muqsit likes this.

Share This Page

Advertisement