Creating an explosion

Discussion in 'Plugin Development' started by Aza24, Jan 23, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Aza24

    Is it possible, when you create an explosion to cancel the sound created by it without the use of Spout?
     
  2. Offline

    gyroninja

    I don't think so. What are you using it for you may be able to make hour own "explosion".
     
  3. Offline

    Aza24

    My very basic effect plugin SmokeMachine, so it is a non damage explosion.
     
  4. Offline

    gyroninja

    I mean if you are going to just have a single explosion (not multiple like a tower of tnt) then you can get the blocks around it, random gen each block if its bigger (maybe smaller) then the resistance value the turn it into air and move onto the next block.
     
  5. Offline

    Aza24

    I really need the smoke cloud effect generated by TNT though and no blocks destroyed.
     
  6. Offline

    tomjw64

    I don't think that you can end up doing what you want without spout, sorry to disappoint you...
    If anything, I would suggest using the smoke effects that you CAN generate with bukkit(the smoke from fire).
     
  7. Offline

    heisan213

    World.createExplosion(Location, 0F); <- will make the sound and effect but no damage to entitys or blocks.
     
  8. Offline

    Aza24

    And how would I create that?
     
  9. Offline

    RROD

    I believe the latest RB allows triggering of sounds for the clients, so in theory there should be a way to cancel them.
     
  10. Offline

    heisan213

    Type Effect. In eclipse and wait for the list to show up. As you see, explosion is not one of the effects that can be sendt to the server. But I repeat what I said a few posts up: to create an explosion with no damage to terrain and entities do someWorld.createExplosion(player.getLocation(), 0F);
     
  11. Offline

    Milkywayz

    Hey how would you allow it to damage other players, but not blocks? Set it to 4f then disable tnt in worldguard?
     
  12. Offline

    desht

    • To create a "fake" explosion (one that damages nothing): world.createExplosion(loc, 0.0F);
    • To create a real explosion (power of 4 is equivalent to TNT): world.createExplosion(loc, 4.0F);
    • To prevent damage to blocks but still allow damage to entities, set up a handler for EntityExplodeEvent, and cancel the event.
    • To prevent damage to some or all entities, set up a handler for EntityDamageEvent and check for a cause of ENTITY_EXPLOSION and/or BLOCK_EXPLOSION.
     
  13. Had a private conversation with Milkywayz and told him something like that. Case solved! :D
     
Thread Status:
Not open for further replies.

Share This Page