mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Config to remove explosion radius clamp
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/level/ServerExplosion.java
|
||||
+++ b/net/minecraft/world/level/ServerExplosion.java
|
||||
@@ -319,7 +_,7 @@
|
||||
) {
|
||||
this.level = level;
|
||||
this.source = source;
|
||||
- this.radius = (float) Math.max(radius, 0.0); // CraftBukkit - clamp bad values
|
||||
+ this.radius = (float) (level == null || level.purpurConfig.explosionClampRadius ? Math.max(radius, 0.0) : radius); // CraftBukkit - clamp bad values // Purpur - Config to remove explosion radius clamp
|
||||
this.center = center;
|
||||
this.fire = fire;
|
||||
this.blockInteraction = blockInteraction;
|
||||
@@ -649,7 +_,7 @@
|
||||
|
||||
public void explode() {
|
||||
// CraftBukkit start
|
||||
- if (this.radius < 0.1F) {
|
||||
+ if ((this.level == null || this.level.purpurConfig.explosionClampRadius) && this.radius < 0.1F) { // Purpur - Config to remove explosion radius clamp
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -224,6 +224,11 @@ public class PurpurWorldConfig {
|
||||
infinityWorksWithoutArrows = getBoolean("gameplay-mechanics.infinity-bow.works-without-arrows", infinityWorksWithoutArrows);
|
||||
}
|
||||
|
||||
public boolean explosionClampRadius = true;
|
||||
private void explosionSettings() {
|
||||
explosionClampRadius = getBoolean("gameplay-mechanics.clamp-explosion-radius", explosionClampRadius);
|
||||
}
|
||||
|
||||
public List<Item> itemImmuneToCactus = new ArrayList<>();
|
||||
public List<Item> itemImmuneToExplosion = new ArrayList<>();
|
||||
public List<Item> itemImmuneToFire = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user