mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-19 14:59:30 +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 <kfian294ma4@gmail.com>
|
|
Date: Thu, 16 Nov 2023 00:59:04 +0000
|
|
Subject: [PATCH] Destroy Waterlogged Blocks
|
|
|
|
|
|
diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java
|
|
index 48d98bac0140cec91fe2c9e7bb72a6f05a70aa49..5810539dbe4ed782ec638bb9f08f183e5a720284 100644
|
|
--- a/net/minecraft/world/level/ServerExplosion.java
|
|
+++ b/net/minecraft/world/level/ServerExplosion.java
|
|
@@ -399,6 +399,11 @@ public class ServerExplosion implements Explosion {
|
|
if (material != null && material.resistance() >= 0.0f && pos.getY() > this.level.getMinY() && (!this.level.sakuraConfig().cannons.explosion.requireTntToDamageDurableMaterials || 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(this, this.level, pos, blockState, fluidState);
|