mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
remove LivingEntity#safeFallDistance API
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
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 6b6340ae8ca3f81f08f9038b63ebc419e003cf6b..ed31528ddfec06e723827a505daeca5938dba865 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 c54bf92fbe8b975aee69819cfdf64ad2cb3065b6..8b440188e2ea6e75adcb9b9e4919279c3a7f8576 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -211,6 +211,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