mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Proper patch for Explosion's world
Though the world argument is not meant to be null, this part of the Ender Dragon creates a new explosion object with a null world.
This commit is contained in:
@@ -5,8 +5,21 @@ Subject: [PATCH] Config to remove explosion radius clamp
|
||||
|
||||
Co-authored-by: Encode42 <me@encode42.dev>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 1e2304347fc369e5d9fe5d4c3cca8856766f5c1a..61fe1d1c3142a6670dc74c4fb13baa9d0fb62e0c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -98,7 +98,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
private final Node[] nodes = new Node[24];
|
||||
private final int[] nodeAdjacency = new int[24];
|
||||
private final BinaryHeap openSet = new BinaryHeap();
|
||||
- private Explosion explosionSource = new Explosion(null, this, null, null, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.BlockInteraction.DESTROY); // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
|
||||
+ private Explosion explosionSource = new Explosion(level, this, null, null, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.BlockInteraction.DESTROY); // CraftBukkit - reusable source for CraftTNTPrimed.getSource() // Purpur
|
||||
// Paper start - add var for save custom podium
|
||||
@Nullable
|
||||
private BlockPos podium;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index c0d39afe5b80159ed9aaca4ddd4763d707882f2e..55414d53061663038f05d68c327f595abb2b0e44 100644
|
||||
index c0d39afe5b80159ed9aaca4ddd4763d707882f2e..3c9e0cee78deeae6b47a186f1bfc47f3956ec9c7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -86,7 +86,7 @@ public class Explosion {
|
||||
@@ -23,7 +36,7 @@ index c0d39afe5b80159ed9aaca4ddd4763d707882f2e..55414d53061663038f05d68c327f595a
|
||||
public void explode() {
|
||||
// CraftBukkit start
|
||||
- if (this.radius < 0.1F) {
|
||||
+ if (this.level != null ? this.level.purpurConfig.explosionClampRadius && this.radius < 0.1F : this.radius < 0.1F) { // Purpur
|
||||
+ if (this.level.purpurConfig.explosionClampRadius && this.radius < 0.1F) { // Purpur
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
Reference in New Issue
Block a user