mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-22 08:19: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 f4b17c01ee6552df325ea02a2f6da22b14f6e78f..646ec2106185a02f8d421c1c52055be8a0d930af 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
@@ -285,6 +285,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
|
|
+ if (!fluidState.isEmpty() && !blockState.liquid() && 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);
|