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

play custom sound from MCPE

Comments in 'Plugin Development' started by ahoj_truhliku, Jul 19, 2015.

  1. ahoj_truhliku
    Offline

    ahoj_truhliku Banned

    Joined:
    Jul 9, 2015
    Posts:
    89
    Minecraft User:
    Creeperface001
    i can add sound using $level->addsound but there are only few sounds from MCPE but in MCPE is a lot more sounds and i think i can play them too so how?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Example?
    hoyinm14mc likes this.
  3. ahoj_truhliku
    Offline

    ahoj_truhliku Banned

    Joined:
    Jul 9, 2015
    Posts:
    89
    Minecraft User:
    Creeperface001
    e.g. Explosion sound
  4. ahoj_truhliku
    Offline

    ahoj_truhliku Banned

    Joined:
    Jul 9, 2015
    Posts:
    89
    Minecraft User:
    Creeperface001
    it is possible it think
  5. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Off course go on and help Shoghi xD
  6. SpiderPig
    Offline

    SpiderPig Active Member

    Joined:
    Sep 21, 2013
    Posts:
    128
    Minecraft User:
    SpiderPig
  7. ahoj_truhliku
    Offline

    ahoj_truhliku Banned

    Joined:
    Jul 9, 2015
    Posts:
    89
    Minecraft User:
    Creeperface001
    but i think it is not hard, all sounds are same only something like ID is diferrent right?
  8. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    PHP:
    namespace Some\Namespace;

    use 
    pocketmine\level\sounds\GenericSound;
    use 
    pocketmine\math\Vector3;

    class 
    ExperimentalSound extends GenericSound{
         public function 
    __construct(Vector3 $pos$pitch 0){
              
    parent::__construct($pos/* Could test ids 1000 - 1015 */1000 $pitch);
         }
    }
    How shoghi gets the id?
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Explosion is a special exception. It is dependent on the explosion event itself.
    From he MCPE source code now that he is the developer. Before, they used things like Wireshark to intercept the connections and study the packet structure. They also disassembled MCPE distributions.
  10. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    But could we find a new sounds just trying random ids? :D
    PEMapModder likes this.
  11. Asidert
    Offline

    Asidert Active Member Plugin Developer

    Joined:
    Oct 21, 2014
    Posts:
    123
    Plugins:
    1
    Minecraft User:
    Asidert
    Maybe :D
  12. ahoj_truhliku
    Offline

    ahoj_truhliku Banned

    Joined:
    Jul 9, 2015
    Posts:
    89
    Minecraft User:
    Creeperface001
    so it is simple using for()
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    PHP:
    for($i 0$i 256$i++)
      
    $client->crash();
  14. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
  15. ahoj_truhliku
    Offline

    ahoj_truhliku Banned

    Joined:
    Jul 9, 2015
    Posts:
    89
    Minecraft User:
    Creeperface001
    and shoghicp has not list of sound IDs? he is in mojang right?

Share This Page

Advertisement