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

Create Particles at XYZ and How to delete them ?

Comments in 'Plugin Development' started by iDirtPlayzMC, Oct 21, 2015.

  1. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    How to create and delete particles at exact XYZ and delete it ?
  2. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    PHP:
    $fire = new FireParticle(new Vector3($x$y$z));
    $level->addParticle($fire);
    $level->removeParticle($fire); // :D.
    Actually the particle will dissappear itself unless it's FloatingTextParticle :p
  3. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    But I want to make a block ( item drop entities ) that float around and cannot be pickup ( fake item ) and will have particles, Im trying to make spawner but like in different way xP
  4. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    So question about deletion is useless right? Btw with this post i hit 1000 posts ;)
  5. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    omg :DDDDD AWEOSMEE
  6. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    Congratulations my friend :D
  7. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    PHP:
    public function onRun($currentTick){
        foreach(
    $this->spawners as $spawner){
            for(
    $c 0$c 10$c++){
             
    $pos $spawner->getPosition()->add($c 10$c 10$c 10);
             
    $particle = new FireParticle($pos);
           }
        }
    }
    Last edited: Oct 21, 2015
  8. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    so when run will chefck that if theres spawner it will have particle?
  9. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    It will provide that spawner block with particles.
  10. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    ;O :DDD awesome
  11. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Just make a new class that will control Spawner block behavior.
  12. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    ( IM NOT EVEN GOOD AT PHP )
  13. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    how will i do that ;-;
  14. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    Whats different btw FloatingTextParticles and Particles
  15. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    FloatingTextParticle extends Particle
    Legoboy0215 likes this.
  16. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I don't think there is a function called Level->removeParticle...
    iDirtPlayzMC likes this.
  17. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    what classes do I use?
    PHP:
    public function onRun($currentTick){
     foreach(
    $this->spawners as $spawner){
     for(
    $c 0$c 10$c++){$pos $spawner->getPosition()->add($c 10$c 10$c 10);$particle = new FireParticle($pos);
     }
     }
    }
  18. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    That why i included laughing emoji in comment.
  19. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    EH
  20. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Your own
    PHP:
    class Spawner extends Solid {

Share This Page

Advertisement