9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-29 19:59:08 +00:00
Files
SakuraMC/patches/server/0045-Allow-explosions-to-destroy-lava.patch
2024-05-04 01:33:31 +01:00

20 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
Date: Sat, 25 Nov 2023 21:14:45 +0000
Subject: [PATCH] Allow explosions to destroy lava
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 9da068ebf5c0245aa099af9e53d34f1dfb5cdde9..3b9e5ffe45dcf1e4a0b2c5d334b0bec666594fa6 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -286,7 +286,7 @@ 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) {
+ } else if (!fluidState.isEmpty() && this.level.sakuraConfig().cannons.explosion.destroyWaterloggedBlocks || blockState.is(Blocks.LAVA) && this.level.sakuraConfig().cannons.explosion.explodeLava) { // Sakura - allow explosions to destroy lava
return Optional.of(ZERO_RESISTANCE);
}
// Sakura end - destroy water logged blocks