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

spawn lightning

Comments in 'Plugin Development' started by Creeperface, Oct 10, 2015.

  1. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    lightning is entity (i think) but will this work?
    PHP:
    $light = new AddEntityPacket();
            
    $light->type 93;
            
    $light->eid Entity::$entityCount++;
            
    $light->metadata 0;
            
    $light->speedX 0;
            
    $light->speedY 0;
            
    $light->speedZ 0;
            
    $light->$b->x;
            
    $light->$b->y;
            
    $light->$b->z;
    Last edited: Oct 10, 2015
  2. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    do you know how to use this on PlayerDeathEvent?
  3. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
  4. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    how?
  5. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    PHP:
    $player->dataPacket($light):
  6. MCPEPIG
    Offline

    MCPEPIG Notable Member

    Joined:
    Jun 22, 2014
    Posts:
    349
    Minecraft User:
    MCPEPIG
    metadata should be an array.
    iksaku likes this.
  7. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Wait. So how do you spawn lightning???
    PHP:
    $light = new AddEntityPacket();
            
    $light->type 93;
            
    $light->eid Entity::$entityCount++;
            
    $light->metadata 0;
            
    $light->speedX 0;
            
    $light->speedY 0;
            
    $light->speedZ 0;
            
    $light->$b->x//WHAT is $b?
            
    $light->$b->y;
            
    $light->$b->z;
  8. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    PHP:
    public function onMove(PlayerMoveEvent $e)
    {
    $p $e->getPlayer();
    $light = new AddEntityPacket();
    $light->type 93;
    $light->eid Entity::$entityCount++;
    $light->metadata = array();
    $light->speedX 0;
    $light->speedY 0;
    $light->speedZ 0;
    $light->$p->x;
    $light->$p->y;
    $light->$p->z;
    $p->dataPacket($light);
    }
    Omg this works :D
    thebigsmileXD and Legoboy0215 like this.
  9. Patrick jean noel
    Offline

    Patrick jean noel New Member

    Joined:
    Apr 26, 2014
    Posts:
    21
    Minecraft User:
    patarhd
    How do you put this into pocketmine?!?
  10. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV

    Attached Files:

  11. Patrick jean noel
    Offline

    Patrick jean noel New Member

    Joined:
    Apr 26, 2014
    Posts:
    21
    Minecraft User:
    patarhd
    So.when I download that,where shale I put it?!? :D
  12. Patrick jean noel
    Offline

    Patrick jean noel New Member

    Joined:
    Apr 26, 2014
    Posts:
    21
    Minecraft User:
    patarhd
    Once I download it where should I put it or do with it on pocketmine?!?
  13. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Stop spamming...
    Taha_The_Hacker and Primus like this.
  14. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Its in plugin draft format so use it as normal plugin.
  15. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    I guess $b is instanceof Block.
    Legoboy0215 likes this.
  16. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    you spam the most.. :p
  17. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Oh ell...
  18. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    I spam smartly... I spam useful stuff. I only said #LearnPHP ONCE!
  19. Patrick jean noel
    Offline

    Patrick jean noel New Member

    Joined:
    Apr 26, 2014
    Posts:
    21
    Minecraft User:
    patarhd
    How to spawn lightning?!? /what?!?...amazing plugin BTW :3
  20. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    Wow thats so cool, never knew about this.

    Attached Files:

Share This Page

Advertisement