9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-23 16:59:16 +00:00
Files
SakuraMC/patches/server/0031-Destroy-Waterlogged-Blocks.patch
Samsuik e51eb03769 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly
2024-07-15 13:07:44 +01:00

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 6495c02d089426b8ee3726f072b5d1662af3cdd5..5639f04b29b46d07e64b5e8b3292666aa0899f62 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -166,7 +166,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);