Explode blocks

Discussion in 'Plugin Development' started by CheesyFreezy, Apr 30, 2015.

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

    CheesyFreezy

    heey heey developers,

    I've got a question. I'm not sure if i'm in the right section, but please keep on reading.
    I'm making a plugin where you can use abilities, one of those abilities is that there will be launched a "meteor" out of the air and when it hits the ground it should explode. The thing that i want is is that when it explodes blocks will fly away and the exploded blocks will be regenerated after 4 seconds. Can someone please write this piece of code, or just explain how i should do it step-by-step?
     
  2. Offline

    Zombie_Striker

    Here's a step-by-step guide
    • Make a list/map that holds the Block instance
    • Launch sand blocks with the ID of each block (their .getdata() and getType())
    • Put all the blocks with their location into the map/list.
    • set up a delayed task, that after ___ time, do the following.
    • -- loop through the list/map.
    • set the block to the map/list instance of the block
    • clear the map/list
     
    mine-care likes this.
Thread Status:
Not open for further replies.

Share This Page