diff options
Diffstat (limited to 'nms-patches/Explosion.patch')
-rw-r--r-- | nms-patches/Explosion.patch | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/nms-patches/Explosion.patch b/nms-patches/Explosion.patch index 4cba2e11..ccc8d40f 100644 --- a/nms-patches/Explosion.patch +++ b/nms-patches/Explosion.patch @@ -1,8 +1,8 @@ --- a/net/minecraft/server/Explosion.java +++ b/net/minecraft/server/Explosion.java -@@ -9,6 +9,13 @@ - import java.util.Map; +@@ -10,6 +10,13 @@ import java.util.Random; + import javax.annotation.Nullable; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -14,7 +14,7 @@ public class Explosion { private final boolean a; -@@ -22,11 +29,12 @@ +@@ -23,11 +30,12 @@ private final float size; private final List<BlockPosition> blocks = Lists.newArrayList(); private final Map<EntityHuman, Vec3D> k = Maps.newHashMap(); @@ -28,7 +28,7 @@ this.posX = d0; this.posY = d1; this.posZ = d2; -@@ -35,6 +43,11 @@ +@@ -36,6 +44,11 @@ } public void a() { @@ -40,7 +40,7 @@ HashSet hashset = Sets.newHashSet(); boolean flag = true; -@@ -68,7 +81,7 @@ +@@ -69,7 +82,7 @@ f -= (f2 + 0.3F) * 0.3F; } @@ -49,7 +49,7 @@ hashset.add(blockposition); } -@@ -112,7 +125,16 @@ +@@ -113,7 +126,16 @@ double d12 = (double) this.world.a(vec3d, entity.getBoundingBox()); double d13 = (1.0D - d7) * d12; @@ -64,10 +64,10 @@ + continue; + } + // CraftBukkit end - double d14 = 1.0D; + double d14 = d13; if (entity instanceof EntityLiving) { -@@ -148,6 +170,50 @@ +@@ -149,6 +171,50 @@ BlockPosition blockposition; if (this.b) { @@ -118,7 +118,7 @@ iterator = this.blocks.iterator(); while (iterator.hasNext()) { -@@ -179,7 +245,8 @@ +@@ -180,7 +246,8 @@ if (iblockdata.getMaterial() != Material.AIR) { if (block.a(this)) { @@ -128,7 +128,7 @@ } this.world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 3); -@@ -194,7 +261,11 @@ +@@ -195,7 +262,11 @@ while (iterator.hasNext()) { blockposition = (BlockPosition) iterator.next(); if (this.world.getType(blockposition).getMaterial() == Material.AIR && this.world.getType(blockposition.down()).b() && this.c.nextInt(3) == 0) { @@ -141,9 +141,9 @@ } } } -@@ -206,7 +277,9 @@ - } +@@ -208,7 +279,9 @@ + @Nullable public EntityLiving getSource() { - return this.source == null ? null : (this.source instanceof EntityTNTPrimed ? ((EntityTNTPrimed) this.source).getSource() : (this.source instanceof EntityLiving ? (EntityLiving) this.source : null)); + // CraftBukkit start - obtain Fireball shooter for explosion tracking |