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

How to use Level Event Packet

Comments in 'Plugin Development' started by CaptainKenji17, Oct 9, 2015.

  1. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    LevelEventPacket::EVENT_START_RAIN owner of fcmcpe said that he uses this to make rain

    but how do I code this like where what 'use pocket' should i do
    ?
  2. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    PHP:
    $pk = new LevelEventPacket();
    $pk->1//set your own coordinates
    $pk->1;
    $pk->1;
    $pk->evid LevelEventPacket::EVENT_START_THUNDER;

    $player->dataPacket($pk);
    Jelly9912 and CaptainKenji17 like this.
  3. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    any 'use pocketmine etc'?
  4. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    PHP:
    use pocketmine\network\protocol\LevelEventPacket;
    CaptainKenji17 likes this.
  5. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    last thing

    what if I want weather snow? How would the position would be? you need to set up your own position for it like the thing on your code? cant it be possible spawn to whole world or around player?
  6. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    how do u add this on PlayerDeathEvent
  7. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Is there snow already? o_O
  8. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    Rain = snow if the location of your place is snow place like example alaska, maybe itll be snowing, maybe on multiworld

    do u know how to add thunder on death?
  9. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    I've been frozen into 0.11.1 :D, havent developed on 0.12.1
  10. CavinMiana
    Offline

    CavinMiana Active Member

    Joined:
    Aug 26, 2015
    Posts:
    101
    Minecraft User:
    CavinMiana
    You mean the sound of thunder?
  11. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    cavin I thought u know pm

    how is Level Event Packet a sound?
  12. CavinMiana
    Offline

    CavinMiana Active Member

    Joined:
    Aug 26, 2015
    Posts:
    101
    Minecraft User:
    CavinMiana
    CaptainKenji17 likes this.
  13. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    There is when you're in a snow land.

Share This Page

Advertisement