mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-21 15:59:26 +00:00
23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
|
|
Date: Thu, 16 Nov 2023 00:59:04 +0000
|
|
Subject: [PATCH] Destroy Waterlogged Blocks
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
index 7ff26a8df45547b430ff470c32cea81697413bba..9f4fbb9475ab011ab6b19e709b6673cd5c9d0895 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
@@ -283,7 +283,11 @@ public class Explosion {
|
|
|
|
if (material != null && material.resistance() >= 0.0f && (this.level.sakuraConfig().cannons.explosion.allowNonTntBreakingDurableBlocks || this.source instanceof net.minecraft.world.entity.item.PrimedTnt)) {
|
|
return Optional.of(material.resistance());
|
|
+ // Sakura start - destroy water logged blocks
|
|
+ } else if (!fluidState.isEmpty() && this.level.sakuraConfig().cannons.explosion.destroyWaterloggedBlocks) {
|
|
+ return Optional.of(ZERO_RESISTANCE);
|
|
}
|
|
+ // Sakura end - destroy water logged blocks
|
|
}
|
|
|
|
return this.damageCalculator.getBlockExplosionResistance((Explosion)(Object)this, this.level, pos, blockState, fluidState);
|