From eaa56941f3fa8b6c3a44c6239b3293107e54ae4a Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Fri, 9 Mar 2012 23:59:13 -0600 Subject: [PATCH] [Bleeding] Make zero (or very small) explosions do no damage. Fixes BUKKIT-931 --- src/main/java/net/minecraft/server/Explosion.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java index 469bfe5a4c..e4ba32070e 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -33,13 +33,18 @@ public class Explosion { public Explosion(World world, Entity entity, double d0, double d1, double d2, float f) { this.world = world; this.source = entity; - this.size = f; + this.size = (float) Math.max(f, 0.0); // CraftBukkit - clamp bad values this.posX = d0; this.posY = d1; this.posZ = d2; } public void a() { + // CraftBukkit start + if (this.size < 0.1F) { + return; + } + // CraftBukkit end float f = this.size; byte b0 = 16;