Exploding TNT without dropping items

Discussion in 'Spigot Plugin Development' started by RoiEX, Jun 7, 2016.

  1. Hi there,
    In my minigame I have a TNT explosion triggered at the right moment...
    My problem is, that I want no items to be dropped when the blocks are exploding...
    I have no idea on where to start...
    Killing all items in the area afterwards would be an option (but not wanted unless there is no other option), but for some reason I don't get the timing right...
    Any leads?
     
  2. Wouldn't there be some sort of event/check to see if the TNT has exploded? Then if its true you just remove all items in about a 3v3 area?
     
  3. EntityExplodeEvent no?
     
  4. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityExplodeEvent.html
     
  5. The thing is, that the size of the tnt explosion is different every time...
    Does somebody know how to calculate a radius according to the explosion size?
     
  6. The easiest way to do this is to have a variable for the explosion made, and just use the EntityExplodeEvent, check if the entity is that variable, and clear out the block list
     
    • Like Like x 1