Explosive Power and Damage

Discussion in 'Plugin Development' started by thebiologist13, Sep 2, 2012.

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

    thebiologist13

    Hello Everybody!

    In my plugin, I am adding some functionality for explosives. I am trying to make creepers, TNT, fireballs, etc. have custom explosive yields and damage. For example, a creeper that creates a huge explosion, but only does 1/2 heart of damage from the massive custom explosion. I have run into a few problems though.

    Show Spoiler
    First of all, creepers do not have a functionality to set their explosive power (beyond charged or not), forcing me to cancel explosive events created by entities being tracked by my plugin. Therefore, I am forced to use createExplosion(Location, yield, incendiary).

    Next, it seems Bukkit fires the damage event for explosives before the explosion itself. This causes problems with just saving the entity the exploded to a HashMap then calling it to see if the damage is modified. I have also tried saving these special entities to a HashMap when my plugin spawns them, but it only half worked.

    Any ideas to how I can have really powerful or weak explosions with custom amounts of inflicted damage to the affected entities? I have been working on this for days to no avail.


    I guess I will rephrase my question, due to no answers in over two weeks. :)

    I decided that this was quite complex and changed it. Instead, I am trying to figure out how Minecraft normally calculates explosive damage. I have looked on Minecraft wiki, but I don't know how to calculate "explosive exposure". I know need to get the blocks along the line of sight between the mob and explosion, yet I have no idea on how to do this. Help would be greatly appreciated.

    Also, what is the easiest way to get the size of a type of mob (like height, width, depth)? Do I have to define them all on my own?

    Thanks in advance! :D
    ~thebiologist13
     
  2. Offline

    thebiologist13

    Does anyone know?
     
Thread Status:
Not open for further replies.

Share This Page