9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-28 11:19:08 +00:00

Rewrite optimise explosions

This commit is contained in:
Samsuik
2024-04-19 18:47:38 +01:00
parent ce7d6229eb
commit 08f3dfa9cf
58 changed files with 1333 additions and 1260 deletions

View File

@@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
Date: Mon, 20 Nov 2023 19:32:31 +0000
Subject: [PATCH] Consistent Explosion Radius
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 9f4fbb9475ab011ab6b19e709b6673cd5c9d0895..085ea33ed1ce47d3eaa5dc72d3baea44991f2c06 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -584,7 +584,7 @@ public class Explosion {
double d2 = CACHED_RAYS[ray + 2];
ray += 3;
// Paper end - optimise explosions
- float f = this.radius * (0.7F + this.level.random.nextFloat() * 0.6F);
+ float f = this.radius * (0.7F + (this.level.sakuraConfig().cannons.explosion.consistentRadius ? 0.7F : this.level.random.nextFloat()) * 0.6F); // Sakura - consistent explosion radius
double d4 = this.x;
double d5 = this.y;
double d6 = this.z;