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

[New API] Creating Entities

Comments in 'Plugin Development' started by Comedyman937, Jun 9, 2014.

  1. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    388
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
    I'm trying to develop a plugin for the New API and I will need to create a fake player with a name tag over its head. I will need to be able to both create it and destroy it. It does not need to move (although it would be nice to know how i can do that too) and I also need to know how to make it spawn in s specific location.
    Lastly what would (if anything) I need to add to the pocketmine "use" list at the beginning of the plugin?

    Can anyone help me out?
    FunneyShip likes this.
  2. FunneyShip
    Offline

    FunneyShip Active Member

    Joined:
    Jun 7, 2014
    Posts:
    36
    Minecraft User:
    FunneyMan
    You need those info for the herobrine plugin.right?
    Comedyman937 likes this.
  3. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    388
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
    Yep. I have almost everything ready. All I need to do besides this is finish the messages that he sends and then his sign placing, griefing, and building abilities. (those I think I know how to do ;))
  4. FunneyShip
    Offline

    FunneyShip Active Member

    Joined:
    Jun 7, 2014
    Posts:
    36
    Minecraft User:
    FunneyMan
    Can i take look at it?
  5. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    388
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
  6. FunneyShip
    Offline

    FunneyShip Active Member

    Joined:
    Jun 7, 2014
    Posts:
    36
    Minecraft User:
    FunneyMan
    PEMapModder and Comedyman937 like this.
  7. FunneyShip
    Offline

    FunneyShip Active Member

    Joined:
    Jun 7, 2014
    Posts:
    36
    Minecraft User:
    FunneyMan
  8. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    388
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
    You can pull request if you want. Its late here so im not uber creative right now.
  9. InusualZ
    Offline

    InusualZ Active Member Plugin Developer

    Joined:
    Aug 23, 2013
    Posts:
    218
    Plugins:
    1
    Minecraft User:
    Inusu4lZ
    You can send the packets manually
    FunneyShip and Comedyman937 like this.
  10. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    388
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
    Using which pocketmine class?
  11. FunneyShip
    Offline

    FunneyShip Active Member

    Joined:
    Jun 7, 2014
    Posts:
    36
    Minecraft User:
    FunneyMan
    Done! I have pull requested you can go check it out
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Look at The Introducer (at AmaiPlugins in my repo list). Although it is for the old API, the packet methods are similar.
    Comedyman937 likes this.
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Anyway, answer:
    AddPlayerPacket.php
    Comedyman937 likes this.
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I gotta start my new API rewrite of The-Introducer now.
  15. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    388
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
    Is it possible to get a random yet safe (no blocks that would be inside the fake player) location for me to teleport "Herobrine"?
  16. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Maybe $level->getSafeSpawn() in new API? Didn't look at it.
    Comedyman937 likes this.
  17. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    388
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
    I though that was only for players when they spawn normally (like player.spawn or player.respawn) but ill look at it a little closer :p
  18. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    388
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
    Would I have to use a Vector3?
    PHP:
    $x rand(1256);
    $y rand(1256);
    $z rand(1256);
    $level->getSafeSpawn(vector3($x$y$z));
    or would I just do
    PHP:
    $x rand(1256);
    $y rand(1256);
    $z rand(1256);
    $level->getSafeSpawn($x$y$z);
  19. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I am not sure about what the argument does.
  20. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    388
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
    I'm not either. Thats why I asked. :p
    PEMapModder likes this.

Share This Page

Advertisement