summaryrefslogtreecommitdiffstats
path: root/nms-patches/Explosion.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-03-01 08:32:46 +1100
committermd_5 <git@md-5.net>2016-03-01 09:32:45 +1100
commitaa008dff0f9bedbe88e1fe79831776b0a52eb90a (patch)
treecb520e0f4cc5d683fb9b7fb95de37480a7443dfb /nms-patches/Explosion.patch
parente1ebe524a78e27f6a2829ed4574fded3779094e1 (diff)
downloadcraftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar
craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.gz
craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.lz
craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.xz
craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.zip
Update to Minecraft 1.9
Diffstat (limited to 'nms-patches/Explosion.patch')
-rw-r--r--nms-patches/Explosion.patch25
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() {