diff options
author | t00thpick1 <t00thpick1dirko@gmail.com> | 2014-06-19 14:38:45 -0400 |
---|---|---|
committer | Wesley Wolfe <wesley.d.wolfe+git@gmail.com> | 2014-06-22 15:23:15 -0500 |
commit | bed3f7f8f54305c94356691d6b8ec9b65a1a5d4a (patch) | |
tree | e1797463550201f7e5a880991d6fac2d4e0e87d7 /src/main/java/net/minecraft/server | |
parent | 5b9950b5f7f4143323c0edced82fce269d5e5ddc (diff) | |
download | craftbukkit-bed3f7f8f54305c94356691d6b8ec9b65a1a5d4a.tar craftbukkit-bed3f7f8f54305c94356691d6b8ec9b65a1a5d4a.tar.gz craftbukkit-bed3f7f8f54305c94356691d6b8ec9b65a1a5d4a.tar.lz craftbukkit-bed3f7f8f54305c94356691d6b8ec9b65a1a5d4a.tar.xz craftbukkit-bed3f7f8f54305c94356691d6b8ec9b65a1a5d4a.zip |
[Bleeding] Repair missing diff in Explosion. Fixes BUKKIT-5662
The blast protection enchantment dampers explosions, however
the functionality was only added to block explosions, and not
entity explosions.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/Explosion.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java index d6ac7287..11007d40 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -168,10 +168,11 @@ public class Explosion { if (!event.isCancelled()) { entity.getBukkitEntity().setLastDamageCause(event); entity.damageEntity(DamageSource.explosion(this), (float) event.getDamage()); + double d11 = EnchantmentProtection.a(entity, d10); - entity.motX += d0 * d10; - entity.motY += d1 * d10; - entity.motZ += d2 * d10; + entity.motX += d0 * d11; + entity.motY += d1 * d11; + entity.motZ += d2 * d11; if (entity instanceof EntityHuman) { this.l.put((EntityHuman) entity, Vec3D.a(d0 * d10, d1 * d10, d2 * d10)); } |