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

HeartsParticle

Comments in 'Plugin Development' started by Kripak, Sep 19, 2015.

  1. Kripak
    Offline

    Kripak New Member

    Joined:
    Jul 17, 2015
    Posts:
    45
    Minecraft User:
    Kripak
    How to propagate hearts particle ?
  2. MCPEPIG
    Offline

    MCPEPIG Notable Member

    Joined:
    Jun 22, 2014
    Posts:
    349
    Minecraft User:
    MCPEPIG
    $this->getServer()->getLevelByName("world")->addParticle(new HeartParticle(new Vector3($x, $y, $z)));
  3. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Mind that you won't always be using the code from the main class. If you have the Level object:
    PHP:
    $level->addParticle(new \pocketmine\level\particle\HeartParticle(new \pocketmine\math\Vector3($x$y$z));
    PEMapModder likes this.
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Since there is only one HeartParticle class and one Vector3 class, you don't need to specify it as there is no confusion.
  5. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    You never know... ;)

Share This Page

Advertisement