mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-30 12:19:08 +00:00
Fix wrong blast resistance used in isDestructableBlock
This commit is contained in:
@@ -142,7 +142,7 @@ index 0000000000000000000000000000000000000000..3f6f34cc617efaad420485a7f613cfca
|
||||
+}
|
||||
diff --git a/src/main/java/me/samsuik/sakura/explosion/SakuraExplosion.java b/src/main/java/me/samsuik/sakura/explosion/SakuraExplosion.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..b87748ae90863abe8f85dcbdc5a202cb3c9e2037
|
||||
index 0000000000000000000000000000000000000000..fc408177991a47bf3955789869f161c1d57d84b7
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/samsuik/sakura/explosion/SakuraExplosion.java
|
||||
@@ -0,0 +1,403 @@
|
||||
@@ -678,7 +678,7 @@ index 02ef6ca32f3de52e921fdcf3f0f572ce7afef318..919680a42a8362859cd87fb3d87e8ee8
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 1b335111bd9eb90bbda87225b740768705f26193..11ce5591f5f7eb487323e2c828218af2461fca09 100644
|
||||
index 1b335111bd9eb90bbda87225b740768705f26193..9ed900e23eb8331ed30b7028ecb06a6fc147a741 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -56,12 +56,14 @@ public class Explosion {
|
||||
@@ -808,7 +808,7 @@ index 1b335111bd9eb90bbda87225b740768705f26193..11ce5591f5f7eb487323e2c828218af2
|
||||
+ float fluidRes = state.getFluidState().getExplosionResistance();
|
||||
+
|
||||
+ // This should be better than just checking if we're within a fluid block.
|
||||
+ return Math.max(blockRes, fluidRes) <= power;
|
||||
+ return (Math.max(blockRes, fluidRes) + 0.3f) * 0.3f <= power;
|
||||
+ }
|
||||
+
|
||||
+ protected boolean isRegionUnprotected() {
|
||||
|
||||
Reference in New Issue
Block a user