3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00
Paper/patches/server/0720-Allow-explosions-under-0-height.patch
Shane Freeder 1c77d64713
Drop codec spam fix (Fixes #5936)
having spoken to mojang about this the general issue is data which shouldn't
have been saved in the first place, so if we lose this data it's not really
an issue, bar being annoying spammy. if the spam gets on your nerves, shamefully,
all you can really do is forceUpgrade to get the conversions of the way.

Dropping as this breaks other aspects of the server and bar being spammy
seems to have no other real negative outcomes
2021-06-26 12:56:06 +01:00

24 Zeilen
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
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 d4785160c1477ed13343e30c913b08175011d048..fb50ee3daba9f4fe8cc173c209521679a59f23d7 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -190,7 +190,7 @@ 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) {