aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1024-Actually-optimise-explosions.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/1024-Actually-optimise-explosions.patch')
-rw-r--r--patches/server/1024-Actually-optimise-explosions.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/server/1024-Actually-optimise-explosions.patch b/patches/server/1024-Actually-optimise-explosions.patch
index 7a35803ac0..629e23722c 100644
--- a/patches/server/1024-Actually-optimise-explosions.patch
+++ b/patches/server/1024-Actually-optimise-explosions.patch
@@ -497,7 +497,7 @@ index 093c814d6835f20b1208236db96bb40b4611936c..b678da2cbb93cea7971bc3c4d324cfca
}
diff --git a/src/main/java/net/minecraft/world/level/ExplosionDamageCalculator.java b/src/main/java/net/minecraft/world/level/ExplosionDamageCalculator.java
-index 4085949accf23728de9a2ff14249cd6ca9b71f8a..5b93c038331c1750260a42726f5bfb97998d93a9 100644
+index 92e06e14fd76fa34b871657c3410a4527cd30e09..da25fee7dd436fbe9f5566311f254ec7a99835d2 100644
--- a/src/main/java/net/minecraft/world/level/ExplosionDamageCalculator.java
+++ b/src/main/java/net/minecraft/world/level/ExplosionDamageCalculator.java
@@ -22,11 +22,17 @@ public class ExplosionDamageCalculator {
@@ -513,9 +513,9 @@ index 4085949accf23728de9a2ff14249cd6ca9b71f8a..5b93c038331c1750260a42726f5bfb97
+ // Paper end - actually optimise explosions
float f = explosion.radius() * 2.0F;
Vec3 vec3 = explosion.center();
- double d = Math.sqrt(entity.distanceToSqr(vec3)) / (double)f;
-- double e = (1.0 - d) * (double)Explosion.getSeenPercent(vec3, entity);
+ double d = Math.sqrt(entity.distanceToSqr(vec3)) / f;
+- double e = (1.0 - d) * Explosion.getSeenPercent(vec3, entity);
+ double e = (1.0 - d) * seenPercent; // Paper - actually optimise explosions
- return (float)((e * e + e) / 2.0 * 7.0 * (double)f + 1.0);
+ return (float)((e * e + e) / 2.0 * 7.0 * f + 1.0);
}
}