diff options
Diffstat (limited to 'patches/server/1024-Actually-optimise-explosions.patch')
-rw-r--r-- | patches/server/1024-Actually-optimise-explosions.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/patches/server/1024-Actually-optimise-explosions.patch b/patches/server/1024-Actually-optimise-explosions.patch index bcb01ef768..629e23722c 100644 --- a/patches/server/1024-Actually-optimise-explosions.patch +++ b/patches/server/1024-Actually-optimise-explosions.patch @@ -497,10 +497,10 @@ 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 24dba1eb6f5dc71e5d1ce2d150930eaefc83f811..f529f5d0f28533ec89f3ee712e59745991d068ee 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 -@@ -20,11 +20,17 @@ public class ExplosionDamageCalculator { +@@ -22,11 +22,17 @@ public class ExplosionDamageCalculator { return true; } @@ -513,9 +513,9 @@ index 24dba1eb6f5dc71e5d1ce2d150930eaefc83f811..f529f5d0f28533ec89f3ee712e597459 + // 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.0D - d) * (double)Explosion.getSeenPercent(vec3, entity); -+ double e = (1.0D - d) * seenPercent; // Paper - actually optimise explosions - return (float)((e * e + e) / 2.0D * 7.0D * (double)f + 1.0D); + 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 * f + 1.0); } } |