diff options
author | Steve Anton <anxuiz.nx@gmail.com> | 2012-07-13 21:14:56 -0700 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-07-14 17:57:31 -0500 |
commit | 8b9aad8c2b4057ab33a7bff2b8711d0d48c13568 (patch) | |
tree | a15b831c8c8ed4455854f1008f92fe24c055b9eb /src/main/java/net/minecraft/server/Explosion.java | |
parent | 79189c1c13eb170226c1e73d249effe3e0e29041 (diff) | |
download | craftbukkit-8b9aad8c2b4057ab33a7bff2b8711d0d48c13568.tar craftbukkit-8b9aad8c2b4057ab33a7bff2b8711d0d48c13568.tar.gz craftbukkit-8b9aad8c2b4057ab33a7bff2b8711d0d48c13568.tar.lz craftbukkit-8b9aad8c2b4057ab33a7bff2b8711d0d48c13568.tar.xz craftbukkit-8b9aad8c2b4057ab33a7bff2b8711d0d48c13568.zip |
Add remaining missing setLastDamageCause's
Diffstat (limited to 'src/main/java/net/minecraft/server/Explosion.java')
-rw-r--r-- | src/main/java/net/minecraft/server/Explosion.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java index ebf4a478..3fc462bb 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -137,9 +137,7 @@ public class Explosion { if (damagee == null) { // nothing was hurt - } else if (this.source == null) { // Block explosion - // TODO: get the x/y/z of the tnt block? - // does this even get called ever? @see EntityTNTPrimed - not BlockTNT or whatever + } else if (this.source == null) { // Block explosion (without an entity source; bed etc.) EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(null, damagee, EntityDamageEvent.DamageCause.BLOCK_EXPLOSION, damageDone); Bukkit.getPluginManager().callEvent(event); @@ -162,6 +160,7 @@ public class Explosion { Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { + entity.getBukkitEntity().setLastDamageCause(event); entity.damageEntity(DamageSource.EXPLOSION, event.getDamage()); entity.motX += d0 * d10; |