9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-19 14:59:30 +00:00

Revert "Protect blocks outside the world border from explosions"

This reverts commit d6b47ce481.
This commit is contained in:
Samsuik
2025-03-07 17:14:52 +00:00
parent dbd72dc699
commit 01115e23c1
2 changed files with 0 additions and 24 deletions

View File

@@ -1,22 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <kfian294ma4@gmail.com>
Date: Fri, 7 Mar 2025 14:21:13 +0000
Subject: [PATCH] Protect blocks outside the world border
diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java
index 451cb54da29ad7e6fc74f4a57df8493ce3e43b2d..43cf8815a04ffd5d5811be7675718084826824d5 100644
--- a/net/minecraft/world/level/ServerExplosion.java
+++ b/net/minecraft/world/level/ServerExplosion.java
@@ -417,6 +417,11 @@ public class ServerExplosion implements Explosion {
return Optional.of(Blocks.BARRIER.getExplosionResistance());
}
// Sakura end - protect scaffolding from creepers
+ // Sakura start - protect blocks outside the world border
+ if (this.level.sakuraConfig().cannons.explosion.protectBlocksOutsideTheWorldBorder && !this.level.getWorldBorder().isWithinBounds(pos)) {
+ return Optional.of(Blocks.BARRIER.getExplosionResistance());
+ }
+ // Sakura end - protect blocks outside the world border
}
return this.damageCalculator.getBlockExplosionResistance(this, this.level, pos, blockState, fluidState);

View File

@@ -98,8 +98,6 @@ public final class WorldConfiguration extends ConfigurationPart {
public boolean explosionsHurtPlayers = true;
public boolean explosionsDropItems = true;
public boolean useBlockCacheAcrossExplosions = false;
@Comment("Protect blocks being destroyed outside the world border")
public boolean protectBlocksOutsideTheWorldBorder = false;
}
public Mechanics mechanics = new Mechanics();