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:
@@ -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);
|
|
||||||
@@ -98,8 +98,6 @@ public final class WorldConfiguration extends ConfigurationPart {
|
|||||||
public boolean explosionsHurtPlayers = true;
|
public boolean explosionsHurtPlayers = true;
|
||||||
public boolean explosionsDropItems = true;
|
public boolean explosionsDropItems = true;
|
||||||
public boolean useBlockCacheAcrossExplosions = false;
|
public boolean useBlockCacheAcrossExplosions = false;
|
||||||
@Comment("Protect blocks being destroyed outside the world border")
|
|
||||||
public boolean protectBlocksOutsideTheWorldBorder = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Mechanics mechanics = new Mechanics();
|
public Mechanics mechanics = new Mechanics();
|
||||||
|
|||||||
Reference in New Issue
Block a user