mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-21 07:49:29 +00:00
23 lines
1.2 KiB
Diff
23 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <kfian294ma4@gmail.com>
|
|
Date: Fri, 7 Mar 2025 17:14:35 +0000
|
|
Subject: [PATCH] Configure breaking blocks outside the world border
|
|
|
|
|
|
diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java
|
|
index 9a3cf92fd767559484d3bd9f94e1c13facbfa86f..05d288c0f467ca28d28afa944c5ec41952085ec9 100644
|
|
--- a/net/minecraft/world/level/ServerExplosion.java
|
|
+++ b/net/minecraft/world/level/ServerExplosion.java
|
|
@@ -535,6 +535,11 @@ public class ServerExplosion implements Explosion {
|
|
return ret;
|
|
}
|
|
// Sakura end - optimise protected explosions
|
|
+ // Sakura start - configure breaking blocks when outside the world border
|
|
+ if (!this.level.sakuraConfig().cannons.explosion.breakBlocksWhenOutsideTheWorldBorder && !this.level.getWorldBorder().isWithinBounds(center)) {
|
|
+ return ret;
|
|
+ }
|
|
+ // Sakura end - configure breaking blocks when outside the world border
|
|
|
|
// only ~1/3rd of the loop iterations in vanilla will result in a ray, as it is iterating the perimeter of
|
|
// a 16x16x16 cube
|