mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
re-add persistent-tileentity-display-names-and-lore as two options
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nico314159 <nicolino.will@gmail.com>
|
||||
Date: Mon, 9 Jan 2023 19:45:55 -0500
|
||||
Subject: [PATCH] Config to remove explosion radius clamp
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 6379b3b8e633d1a16532b4664e53fa5afa616ab6..69d8ff6a97335b6fe4b20a8229a77f2591b0f050 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -98,7 +98,7 @@ public class Explosion {
|
||||
this.hitPlayers = Maps.newHashMap();
|
||||
this.level = world;
|
||||
this.source = entity;
|
||||
- this.radius = (float) Math.max(power, 0.0); // CraftBukkit - clamp bad values
|
||||
+ this.radius = (float) (world == null || world.purpurConfig.explosionClampRadius ? Math.max(power, 0.0) : power); // CraftBukkit - clamp bad values // Purpur
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
@@ -426,7 +426,7 @@ public class Explosion {
|
||||
|
||||
public void explode() {
|
||||
// CraftBukkit start
|
||||
- if (this.radius < 0.1F) {
|
||||
+ if ((this.level == null || this.level.purpurConfig.explosionClampRadius) && this.radius < 0.1F) { // Purpur
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 5b54dcf2d352aa4f998d887fe2d8455b396794a2..77308b060ef41c4782ef8fa92556e41c4bc8dcb0 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -221,6 +221,11 @@ public class PurpurWorldConfig {
|
||||
entitySharedRandom = getBoolean("settings.entity.shared-random", entitySharedRandom);
|
||||
}
|
||||
|
||||
+ public boolean explosionClampRadius = true;
|
||||
+ private void explosionSettings() {
|
||||
+ explosionClampRadius = getBoolean("gameplay-mechanics.clamp-explosion-radius", explosionClampRadius);
|
||||
+ }
|
||||
+
|
||||
public boolean infinityWorksWithoutArrows = false;
|
||||
public boolean infinityWorksWithNormalArrows = true;
|
||||
public boolean infinityWorksWithSpectralArrows = false;
|
||||
Reference in New Issue
Block a user