Updated Upstream (CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
b5d7883a SPIGOT-6634: Override needed method
99561c21 SPIGOT-6624: Explosions do not destroy blocks out of vanilla heights in custom dimensions
This commit is contained in:
Nassim Jahnke 2021-07-09 16:08:42 +02:00
parent fc955009ca
commit 081a882f94
4 changed files with 3 additions and 26 deletions

View File

@ -1,23 +0,0 @@
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 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) {

View File

@ -4257,7 +4257,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -0,0 +0,0 @@ public class DummyGeneratorAccess implements LevelAccessor { @@ -0,0 +0,0 @@ public class DummyGeneratorAccess implements LevelAccessor {
public FluidState getFluidState(BlockPos pos) { public FluidState getFluidState(BlockPos pos) {
throw new UnsupportedOperationException("Not supported yet."); return Fluids.EMPTY.defaultFluidState(); // SPIGOT-6634
} }
+ // Paper start - if loaded util + // Paper start - if loaded util
+ @javax.annotation.Nullable + @javax.annotation.Nullable

View File

@ -45,7 +45,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.FluidState;
@@ -0,0 +0,0 @@ public class Explosion { @@ -0,0 +0,0 @@ public class Explosion {
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)) {
set.add(blockposition); set.add(blockposition);
+ // Paper start - prevent headless pistons from forming + // Paper start - prevent headless pistons from forming
+ if (!com.destroystokyo.paper.PaperConfig.allowHeadlessPistons && iblockdata.getBlock() == Blocks.MOVING_PISTON) { + if (!com.destroystokyo.paper.PaperConfig.allowHeadlessPistons && iblockdata.getBlock() == Blocks.MOVING_PISTON) {

@ -1 +1 @@
Subproject commit fb556bfa1404661b38cc3abd1f0a7d02764f8f5b Subproject commit b5d7883afc519c56031e6cd93462ba4601075aae