Explosion levels

Discussion in 'Plugin Development' started by GusGold, Jun 10, 2013.

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

    GusGold

    When you create an explosion event with createExplosion you give both the location and the explosion strength. Now I know the 0F is the 15th level and also removes all damage to both blocks and entities, but what are the equivalent levels for vanilla explosions such as creepers, ghastly balls, and tnt. If there were a table of this data, that would be very helpful.

    Also, is there an easy way to be able to prevent player/mob damage from a unique event ie. Get an event id for the explosion created, and then cancel an onPlayerDamage with the corresponding id?

    Thanks for the help and information.
     
  2. Offline

    kreashenz

    GusGold Do you mean the default? I believe it's 4F
     
  3. Offline

    GusGold

  4. Offline

    kreashenz

    GusGold I think it's for all? :s I'm not completely sure, but I would say creeper is 2F and fireball is 2F, too. TNT is default 4F.
     
  5. Offline

    GusGold

    kreashenz thanks for that. Do you know anyway to cancel the certain damage events as well?
     
  6. Offline

    kreashenz

    GusGold Yes. EntityDamageEvent, check the cause (getDamageCause()/getCause()) and if it's the certain damage thing, cancel it.
     
  7. Offline

    GusGold

    kreashenz yeah, I know about that, but I only want it effecting the explosions I want it to, not all explosions.
     
  8. the table of the explosion powe ris found here: http://www.minecraftwiki.net/wiki/Explosion
    Explosion source Power
    Wither (on creation) 7
    Ender Crystal 6
    Charged Creeper 6
    Bed (in Nether or End) 5
    TNT 4
    Creeper 3
    Ghast fireball 1
    Black Wither skull 1
    Blue Wither skull 1
     
  9. Offline

    GusGold

    ferrybig yeah, I had found that, I just don't know whether they correspond to the values used :/
     
Thread Status:
Not open for further replies.

Share This Page