diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-10-11 00:37:39 +0100 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-10-11 00:37:39 +0100 |
commit | a49a35834968612e3c2cc30495459a0d1f04b6cf (patch) | |
tree | d90a9120e2b84a0e0cde606e3fac1140027eb0d6 /src/main/java/net/minecraft/server/Explosion.java | |
parent | 7e005474b68460101971579d45e8b4ed9cdf9b9e (diff) | |
download | craftbukkit-a49a35834968612e3c2cc30495459a0d1f04b6cf.tar craftbukkit-a49a35834968612e3c2cc30495459a0d1f04b6cf.tar.gz craftbukkit-a49a35834968612e3c2cc30495459a0d1f04b6cf.tar.lz craftbukkit-a49a35834968612e3c2cc30495459a0d1f04b6cf.tar.xz craftbukkit-a49a35834968612e3c2cc30495459a0d1f04b6cf.zip |
Changing the blockList on explosions now correctly updates which blocks are changed
Diffstat (limited to 'src/main/java/net/minecraft/server/Explosion.java')
-rw-r--r-- | src/main/java/net/minecraft/server/Explosion.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java index 4db1a31a..67fdefdd 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -194,6 +194,15 @@ public class Explosion { EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList); this.world.getServer().getPluginManager().callEvent(event); + + arraylist.clear(); + blocks.clear(); + + for (org.bukkit.block.Block block : event.blockList()) { + ChunkCoordinates coords = new ChunkCoordinates(block.getX(), block.getY(), block.getZ()); + arraylist.add(coords); + blocks.add(coords); + } if (event.isCancelled()) { this.wasCanceled = true; |