Creating explosion without sound

Discussion in 'Plugin Development' started by r3Fuze, Sep 26, 2011.

Thread Status:
Not open for further replies.
  1. I doubt its possible but i just wanted to make sure.
    I want to create an explosion(or just the explosion effect) that doesn't play any sound without using
    Code:
    player.getWorld().playEffect(player.getLocation(), Effect.SMOKE, 0);
    If it can be achieved with Spout, that would be great.
     
  2. Offline

    md_5

    Nope without modding the actual server im pretty sure it aint possible. It could probably be hackily done using the spout packet manager but Other than that nothing
     
  3. @md_5 Hmm, if you ever stumble upon a way to do this, be sure to tell me.
    Thanks for the fast reply :)
     
  4. Offline

    md_5

    Ill make a note of it. Doing work on a pretty massive plugin at the moment but once thats done in a few weeks i want to do some fooling with spout.
     
  5. Offline

    rmb938

    Well you can make a "Fake explosion" make a method that sets all the blocks a specific radius to air.
     
  6. @rmb938 Im not trying to create an explosion to destroy blocks, i just want the smoke effect :)
    I gave up and used:
    Code:java
    1. int repeat = 0;
    2. while (repeat < 4) {
    3. for (double x = (s_entity.getLocation().getX() - 2); x <= (s_entity.getLocation().getX() + 2); x++) {
    4. for (double y = (s_entity.getLocation().getY() - 2); y <= (s_entity.getLocation().getY() + 2); y++) {
    5. for (double z = (s_entity.getLocation().getZ() - 2); z <= (s_entity.getLocation().getZ() + 2); z++) {
    6. s_entity.getWorld().playEffect(new Location(s_entity.getWorld(), x, y, z), Effect.SMOKE, 10);
    7. }
    8. }
    9. }
    10. repeat++;
    11. }
     
  7. Offline

    rmb938

    Oh and yea that works. You could also you a for loop so you wouldn't need that extra varriable

    Code:
        for (int i = 0; i < 4; i++) {
            for (double x = (s_entity.getLocation().getX() - 2); x <= (s_entity.getLocation().getX() + 2); x++) {
                for (double y = (s_entity.getLocation().getY() - 2); y <= (s_entity.getLocation().getY() + 2); y++) {
                for (double z = (s_entity.getLocation().getZ() - 2); z <= (s_entity.getLocation().getZ() + 2); z++) {
                s_entity.getWorld().playEffect(new Location(s_entity.getWorld(), x, y, z), Effect.SMOKE, 10);
                    }
                }
            }
        }
     
  8. Offline

    Butkicker12

    I did this
    w.createExplosion(loc, -1);
     
Thread Status:
Not open for further replies.

Share This Page