TnT Explosions Block Damage

Discussion in 'Plugin Development' started by Eggspurt, May 29, 2015.

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

    Eggspurt

    How would I customize the amount of TnT it'll take to damage Obsidian?

    I.E - It'll take 5 tnt to blow up Obsidian

    I'm sure theres a plugin but I would like to know how to do this for reference

    Thanks a lot bukkit community!
     
  2. Offline

    Zombie_Striker

    @Eggspurt
    You would need to create a map that stores Blocks,Integers. When obsidian is within that area when it explodes, you add the block instance with a number (starting with 0 and incrementing every time: (Integer Instance)+1) Once that number is high enough (lets say 5), then you would remove the block from the map and use Block#breaknaturally();
     
  3. Offline

    Eggspurt

    I'm not asking to be spoonfed, but I am not the best with maps. Do you think you could make like a quick example of how to do the mapping?
     
  4. Offline

    Zombie_Striker

    Code:
    HashMap<Key,Value> method = new HashMap<Key,Value>();
    method.put("Key1","Value1");
    method.get("Key1");
    //ect.
     
Thread Status:
Not open for further replies.

Share This Page