diff --git a/patches/server/0003-Sakura-Configuration-Files.patch b/patches/server/0003-Sakura-Configuration-Files.patch index 6a32526..3d16569 100644 --- a/patches/server/0003-Sakura-Configuration-Files.patch +++ b/patches/server/0003-Sakura-Configuration-Files.patch @@ -595,10 +595,10 @@ index 0000000000000000000000000000000000000000..94dd734ca4049354f925af1736bda57c +} diff --git a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java new file mode 100644 -index 0000000000000000000000000000000000000000..b61e1581b3de1bae39492598afb196e3f00c386e +index 0000000000000000000000000000000000000000..42a233ad23223c857b6c86936415380e1eaf30d1 --- /dev/null +++ b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java -@@ -0,0 +1,238 @@ +@@ -0,0 +1,239 @@ +package me.samsuik.sakura.configuration; + +import com.mojang.logging.LogUtils; @@ -700,6 +700,7 @@ index 0000000000000000000000000000000000000000..b61e1581b3de1bae39492598afb196e3 + public boolean explosionsHurtPlayers = true; + public boolean explosionsDropItems = true; + public boolean useBlockCacheAcrossExplosions = false; ++ public boolean breakBlocksWhenOutsideTheWorldBorder = true; + } + + public Mechanics mechanics = new Mechanics(); diff --git a/patches/server/0084-Configure-breaking-blocks-outside-the-world-border.patch b/patches/server/0084-Configure-breaking-blocks-outside-the-world-border.patch new file mode 100644 index 0000000..22c1cfc --- /dev/null +++ b/patches/server/0084-Configure-breaking-blocks-outside-the-world-border.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samsuik +Date: Fri, 7 Mar 2025 19:16:58 +0000 +Subject: [PATCH] Configure breaking blocks outside the world border + + +diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java +index 2679c5062a6385466dc707582ada71b361ec7106..8eb9e93427a4a43f8264e8bd73bca1f35ea9085e 100644 +--- a/src/main/java/net/minecraft/world/level/Explosion.java ++++ b/src/main/java/net/minecraft/world/level/Explosion.java +@@ -565,6 +565,11 @@ public class Explosion { + + protected final void searchForBlocks(ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache[] blockCache, final ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache initialCache) { + // Sakura end - optimise paper explosions ++ // Sakura start - configure breaking blocks when outside the world border ++ if (!this.level.sakuraConfig().cannons.explosion.breakBlocksWhenOutsideTheWorldBorder && !this.level.getWorldBorder().isWithinBounds(new Vec3(this.x, this.y, this.z))) { ++ return; ++ } ++ // Sakura end - configure breaking blocks when outside the world border + for (int ray = 0, len = CACHED_RAYS.length; ray < len;) { + ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache cachedBlock = initialCache; +