diff options
Diffstat (limited to 'nms-patches/Explosion.patch')
-rw-r--r-- | nms-patches/Explosion.patch | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/nms-patches/Explosion.patch b/nms-patches/Explosion.patch index 5ee04c65..85de23f8 100644 --- a/nms-patches/Explosion.patch +++ b/nms-patches/Explosion.patch @@ -49,24 +49,25 @@ hashset.add(blockposition); } -@@ -112,7 +125,15 @@ +@@ -112,7 +125,16 @@ double d12 = (double) this.world.a(vec3d, entity.getBoundingBox()); double d13 = (1.0D - d7) * d12; -- entity.damageEntity(DamageSource.explosion(this), (float) ((int) ((d13 * d13 + d13) / 2.0D * 8.0D * (double) f3 + 1.0D))); -+ // entity.damageEntity(DamageSource.explosion(this), (float) ((int) ((d13 * d13 + d13) / 2.0D * 8.0D * (double) f3 + 1.0D)));+ // CraftBukkit start +- entity.damageEntity(DamageSource.explosion(this), (float) ((int) ((d13 * d13 + d13) / 2.0D * 7.0D * (double) f3 + 1.0D))); ++ // CraftBukkit start ++ // entity.damageEntity(DamageSource.explosion(this), (float) ((int) ((d13 * d13 + d13) / 2.0D * 7.0D * (double) f3 + 1.0D))); + CraftEventFactory.entityDamage = source; + entity.forceExplosionKnockback = false; -+ boolean wasDamaged = entity.damageEntity(DamageSource.explosion(this), (float) ((int) ((d13 * d13 + d13) / 2.0D * 8.0D * (double) f3 + 1.0D))); ++ boolean wasDamaged = entity.damageEntity(DamageSource.explosion(this), (float) ((int) ((d13 * d13 + d13) / 2.0D * 7.0D * (double) f3 + 1.0D))); + CraftEventFactory.entityDamage = null; + if (!wasDamaged && !(entity instanceof EntityTNTPrimed || entity instanceof EntityFallingBlock) && !entity.forceExplosionKnockback) { + continue; + } + // CraftBukkit end - double d14 = EnchantmentProtection.a(entity, d13); + double d14 = 1.0D; - entity.motX += d8 * d14; -@@ -140,6 +161,50 @@ + if (entity instanceof EntityLiving) { +@@ -148,6 +170,50 @@ BlockPosition blockposition; if (this.b) { @@ -117,9 +118,9 @@ iterator = this.blocks.iterator(); while (iterator.hasNext()) { -@@ -170,7 +235,8 @@ +@@ -179,7 +245,8 @@ - if (block.getMaterial() != Material.AIR) { + if (iblockdata.getMaterial() != Material.AIR) { if (block.a(this)) { - block.dropNaturally(this.world, blockposition, this.world.getType(blockposition), 1.0F / this.size, 0); + // CraftBukkit - add yield @@ -127,10 +128,10 @@ } this.world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 3); -@@ -185,7 +251,11 @@ +@@ -194,7 +261,11 @@ while (iterator.hasNext()) { blockposition = (BlockPosition) iterator.next(); - if (this.world.getType(blockposition).getBlock().getMaterial() == Material.AIR && this.world.getType(blockposition.down()).getBlock().o() && this.c.nextInt(3) == 0) { + if (this.world.getType(blockposition).getMaterial() == Material.AIR && this.world.getType(blockposition.down()).b() && this.c.nextInt(3) == 0) { - this.world.setTypeUpdate(blockposition, Blocks.FIRE.getBlockData()); + // CraftBukkit start - Ignition by explosion + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(this.world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this).isCancelled()) { @@ -140,7 +141,7 @@ } } } -@@ -197,7 +267,9 @@ +@@ -206,7 +277,9 @@ } public EntityLiving getSource() { |