From 65a6e249eaf15c2628f5fb34f20fb8a8805f69e1 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 24 Jun 2021 01:44:23 +0100 Subject: [PATCH] Allow explosions under 0 height (Fixes #5974) Upstream forgot to update the check here which prevents explosions occuring under 0 height, however, vanilla already checks that we are in bounds of the world above this, so this call is entirely redundant. --- .../Allow-explosions-under-0-height.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 patches/server/Allow-explosions-under-0-height.patch diff --git a/patches/server/Allow-explosions-under-0-height.patch b/patches/server/Allow-explosions-under-0-height.patch new file mode 100644 index 0000000000..85eb78081c --- /dev/null +++ b/patches/server/Allow-explosions-under-0-height.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Thu, 24 Jun 2021 01:42:35 +0100 +Subject: [PATCH] Allow explosions under 0 height + +Upstream forgot to update the check here which prevents explosions +occuring under 0 height, however, vanilla already checks that we +are in bounds of the world above this, so this call is entirely +redundant. + +diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/level/Explosion.java ++++ b/src/main/java/net/minecraft/world/level/Explosion.java +@@ -0,0 +0,0 @@ public class Explosion { + f -= ((Float) optional.get() + 0.3F) * 0.3F; + } + +- if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockposition, iblockdata, f) && blockposition.getY() < 256 && blockposition.getY() >= 0) { // CraftBukkit - don't wrap explosions ++ if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockposition, iblockdata, f)/* && blockposition.getY() < 256 && blockposition.getY() >= 0*/) { // CraftBukkit - don't wrap explosions // Paper - permit < 0 + set.add(blockposition); + // Paper start - prevent headless pistons from forming + if (!com.destroystokyo.paper.PaperConfig.allowHeadlessPistons && iblockdata.getBlock() == Blocks.MOVING_PISTON) {