Solved spawnParticle() method block crack id PLEASE HELP ME.

Discussion in 'Spigot Plugin Development' started by ItsSpidot, Jun 8, 2017.

  1. Can someone tell me how to spawn a bunch of block crack particles with ID dirt block? or falling_dust color brown or something just like that...
    thanks.
     
  2. Any examples of code you've tried??
     
  3. spawnParticle. For last value (T data), you need to give the MaterialData of the block which particle color is linked to (If you give material data of redstone, they will be red)
     
    • Like Like x 1
  4. here is an example but for some reason this is not working ... Screenshot_4.png

    idk how i can do this so please dont comment my thing. thanks.
     

  5. Code (Text):
    b.getWorld().spawnParticle(Particle.BLOCK_CRACK, b.getLocation().add(0,1,0), 100, Material.DIRT.getData());
     
  6. nope .. it doesn't work....
     
  7. Code (Text):
    b.getWorld().spawnParticle(Particle.BLOCK_CRACK, b.getLocation().add(0,1,0), 100, new MaterialData(Material.DIRT));
     
    • Useful Useful x 1
  8. IT WORKS THANK YOU VERY * 99999999 MUCCHHH!!!! <3 <3 <3