SPIGOT-6624: Explosions do not destroy blocks out of vanilla heights in custom dimensions

By: dYens <dani_raiders@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot 2021-07-07 07:27:16 +10:00
parent e8c9836ec9
commit 0a1df9ec02

View File

@ -44,15 +44,6 @@
this.level.a(this.source, GameEvent.EXPLODE, new BlockPosition(this.x, this.y, this.z)); this.level.a(this.source, GameEvent.EXPLODE, new BlockPosition(this.x, this.y, this.z));
Set<BlockPosition> set = Sets.newHashSet(); Set<BlockPosition> set = Sets.newHashSet();
boolean flag = true; boolean flag = true;
@@ -174,7 +188,7 @@
f -= ((Float) optional.get() + 0.3F) * 0.3F;
}
- if (f > 0.0F && this.damageCalculator.a(this, this.level, blockposition, iblockdata, f)) {
+ if (f > 0.0F && this.damageCalculator.a(this, this.level, blockposition, iblockdata, f) && blockposition.getY() < 256 && blockposition.getY() >= 0) { // CraftBukkit - don't wrap explosions
set.add(blockposition);
}
@@ -218,7 +232,16 @@ @@ -218,7 +232,16 @@
double d12 = (double) a(vec3d, entity); double d12 = (double) a(vec3d, entity);
double d13 = (1.0D - d7) * d12; double d13 = (1.0D - d7) * d12;