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

Arrow and Bow~snowball [PARTICLES]

Comments in 'Plugin Development' started by Marcelo234, Apr 26, 2016.

  1. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204
    When you shoot with Bow and Arrow, behind the arrow will be Red particles.... How I do this with a Snowball?
    Thanks in advance :D
  2. _Neisufek_
    Offline

    _Neisufek_ New Member

    Joined:
    Apr 17, 2016
    Posts:
    16
    Minecraft User:
    xNaisu
    I never tried that before, but this could possibly work. Test it if you want.
    PHP:
    use pocketmine\event\entity\ProjectileLaunchEvent as SBLaunch;
    use 
    pocketmine\entity\Snowball;

    public function
    EntityEvent(SBLaunch $e){
    $proj $e -> getEntity();

    if(!(
    $proj instanceof Snowball)) return;
    $times 5;
    for(
    $i 0$i $times 1; ++$i){
    $pos $proj-> getSide(Vector3::SIDE_SOUTH$i);
    $r = new DustParticle($pos,2550,0);
    $proj->level->addParticle($r);
    }
    }


    Skullex likes this.

Share This Page

Advertisement