mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-28 11:19:08 +00:00
Fix durable blocks being destructable at the bottom of the world
This would causes issues if bedrock is configured to be a durable block.
This commit is contained in:
@@ -104,7 +104,7 @@ index a8008c7550488be34b51f4280f5569170b1ebd1d..ccc0e211648a77bb396b8b0e9d3b3984
|
||||
public String getDescriptionId() {
|
||||
return this.getOrCreateDescriptionId();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 4571eca1a595c36791bca12ee1a65e55a4c693ac..ce61d1167c0a956cf461509b7c520c15bae56b0a 100644
|
||||
index ceedd8ab94f2f3e2f61b3caf84121dfef4e73bbe..2760075bf3a2f723a0470b559ed2c2e002991d9b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -145,7 +145,7 @@ public class Explosion {
|
||||
@@ -126,7 +126,7 @@ index 4571eca1a595c36791bca12ee1a65e55a4c693ac..ce61d1167c0a956cf461509b7c520c15
|
||||
+ Block block = blockState.getBlock();
|
||||
+ me.samsuik.sakura.explosion.durable.DurableMaterial material = this.level.localConfig().config(pos).durableMaterials.get(block);
|
||||
+
|
||||
+ if (material != null && material.resistance() >= 0.0f && (this.level.sakuraConfig().cannons.explosion.allowNonTntBreakingDurableBlocks || this.source instanceof net.minecraft.world.entity.item.PrimedTnt)) {
|
||||
+ if (material != null && material.resistance() >= 0.0f && pos.getY() > this.level.getMinBuildHeight() && (this.level.sakuraConfig().cannons.explosion.allowNonTntBreakingDurableBlocks || this.source instanceof net.minecraft.world.entity.item.PrimedTnt)) {
|
||||
+ return Optional.of(material.resistance());
|
||||
+ }
|
||||
+ }
|
||||
|
||||
@@ -5,11 +5,11 @@ 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 407154670acbec704ef6804a33c320ab9246c16d..b32f377079a7c97840079b0a6b541be936c822dd 100644
|
||||
index 2760075bf3a2f723a0470b559ed2c2e002991d9b..e941719d74f46b0bcf6e74c704d1a87f6cb37e4e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -168,6 +168,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)) {
|
||||
if (material != null && material.resistance() >= 0.0f && pos.getY() > this.level.getMinBuildHeight() && (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
|
||||
|
||||
Reference in New Issue
Block a user