mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 22:44:17 +01:00
[Bleeding] Make zero (or very small) explosions do no damage. Fixes BUKKIT-931
This commit is contained in:
parent
996832ff6c
commit
eaa56941f3
@ -33,13 +33,18 @@ public class Explosion {
|
|||||||
public Explosion(World world, Entity entity, double d0, double d1, double d2, float f) {
|
public Explosion(World world, Entity entity, double d0, double d1, double d2, float f) {
|
||||||
this.world = world;
|
this.world = world;
|
||||||
this.source = entity;
|
this.source = entity;
|
||||||
this.size = f;
|
this.size = (float) Math.max(f, 0.0); // CraftBukkit - clamp bad values
|
||||||
this.posX = d0;
|
this.posX = d0;
|
||||||
this.posY = d1;
|
this.posY = d1;
|
||||||
this.posZ = d2;
|
this.posZ = d2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a() {
|
public void a() {
|
||||||
|
// CraftBukkit start
|
||||||
|
if (this.size < 0.1F) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
float f = this.size;
|
float f = this.size;
|
||||||
byte b0 = 16;
|
byte b0 = 16;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user