diff --git a/gradle.properties b/gradle.properties index ea11dbe..f9b2f94 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ release=pre # true for push to repo, false for skip push repo, auto for detect by release value pushRepo=auto -foliaRef=e48800d446d2bdeb24a8d31d671554440687e846 +foliaRef=57f643f10e0a9d01024773232d38ae666067d593 org.gradle.configuration-cache=true org.gradle.caching=true diff --git a/settings.gradle.kts b/settings.gradle.kts index 5c37449..3b725a7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -54,4 +54,6 @@ gradle.lifecycle.beforeProject { "$mcVersion.build.$shirohaBuildNumber-${shirohaVersionChannel.lowercase()}" } version = versionString -} \ No newline at end of file +} + +include("FlowSched") \ No newline at end of file diff --git a/shiroha-api/paper-patches/features/0001-Rebrand-to-Shiroha.patch b/shiroha-api/paper-patches/features/0001-Rebrand-to-Shiroha.patch index 036c438..f8ec673 100644 --- a/shiroha-api/paper-patches/features/0001-Rebrand-to-Shiroha.patch +++ b/shiroha-api/paper-patches/features/0001-Rebrand-to-Shiroha.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand to Shiroha diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java -index 652ff54e7c50412503725d628bfe72ed03059790..add32abb29a291e77fe4d74a6d9f10344897ab26 100644 +index 56a5877181e8d37518b178c95155e892c442e96d..4cab6adb697483ba421d1b9af8d5843ccda410fd 100644 --- a/src/main/java/io/papermc/paper/ServerBuildInfo.java +++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java @@ -19,6 +19,17 @@ public interface ServerBuildInfo { diff --git a/shiroha-api/paper-patches/features/0004-KioCG-Chunk-API.patch b/shiroha-api/paper-patches/features/0004-KioCG-ChunkHot-API.patch similarity index 70% rename from shiroha-api/paper-patches/features/0004-KioCG-Chunk-API.patch rename to shiroha-api/paper-patches/features/0004-KioCG-ChunkHot-API.patch index f758d36..ec32864 100644 --- a/shiroha-api/paper-patches/features/0004-KioCG-Chunk-API.patch +++ b/shiroha-api/paper-patches/features/0004-KioCG-ChunkHot-API.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Helvetica Volubi -Date: Sun, 28 Jun 2026 16:40:49 +0800 -Subject: [PATCH] KioCG Chunk API +Date: Sat, 8 Aug 2026 11:42:50 +0800 +Subject: [PATCH] KioCG ChunkHot API diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java @@ -16,13 +16,13 @@ index d873b78f6935a23ff8f6092b80968267b182cc0f..b4323370859dd4d9e86614484cdb9d2e + long getChunkHotAvg(); // KioCG } diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 7a719d31fbc7633a9bb87ea97338190ee3a6047a..b79b9a2ad108c0488d3cc3862f72985059bb4988 100644 +index 65e83e171ab4c514662b9344e08f7065fa9efaa1..274af6397b5f7c0b6787e2669de80e54858950a2 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -4020,4 +4020,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - default ObjectContents asObjectContents() { - return this.getPlayerProfile().asObjectContents(); - } +@@ -4050,4 +4050,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * clearing any fixed pose in the process. + */ + void unsetFixedPose(); + + long getNearbyChunkHot(); // KioCG } diff --git a/shiroha-server/build.gradle.kts.patch b/shiroha-server/build.gradle.kts.patch index 960cf27..9cdaa54 100644 --- a/shiroha-server/build.gradle.kts.patch +++ b/shiroha-server/build.gradle.kts.patch @@ -108,7 +108,7 @@ "Build-Number" to (build ?: ""), "Build-Time" to buildTime.toString(), "Git-Branch" to gitBranch, -@@ -341,7 +_,7 @@ +@@ -352,7 +_,7 @@ } fill { @@ -117,7 +117,7 @@ versionFamily(paperweight.minecraftVersion.map { it.split(".", "-").takeWhile { part -> part.toIntOrNull() != null }.take(2).joinToString(".") }) version(paperweight.minecraftVersion) -@@ -355,4 +_,16 @@ +@@ -366,4 +_,16 @@ } } } diff --git a/shiroha-server/minecraft-patches/features/0001-Config-system-framework.patch b/shiroha-server/minecraft-patches/features/0001-Config-system-framework.patch index 4e80df2..576e174 100644 --- a/shiroha-server/minecraft-patches/features/0001-Config-system-framework.patch +++ b/shiroha-server/minecraft-patches/features/0001-Config-system-framework.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Config system framework diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java -index e2939cc39a8c103e4c4d7b01d39b5546486e4fbc..8777d662148e41fae9e137a473e47e8b9b5abbfb 100644 +index 693ce1c23c7be6406eda22da57aa4a1b86a08f5f..7ecfbadf673b7a90f570cb668d9a1d5116d39fdb 100644 --- a/net/minecraft/server/Main.java +++ b/net/minecraft/server/Main.java @@ -110,6 +110,7 @@ public class Main { @@ -17,10 +17,10 @@ index e2939cc39a8c103e4c4d7b01d39b5546486e4fbc..8777d662148e41fae9e137a473e47e8b Bootstrap.bootStrap(); Bootstrap.validate(); diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 6f13870a1b463049dd37cf1c65d0bdecfc35b5c4..9038249341851ed67ef8392b19d49d7fb70d4137 100644 +index be15a671e0b39b455cd5983f4b90f8f3022a2ebc..28a90b03bde5e2aafefe8d9a20160ef5e4c7e3e9 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1169,6 +1169,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop queue = new java.util.ArrayDeque<>(); queue.add(this); -@@ -4212,14 +4218,24 @@ public abstract class Entity +@@ -4208,14 +4214,24 @@ public abstract class Entity for (EntityTreeNode passenger : passengers) { queue.add(passenger); diff --git a/shiroha-server/minecraft-patches/features/0014-Fix-player-auto-saving-ignores-interval.patch b/shiroha-server/minecraft-patches/features/0014-Fix-player-auto-saving-ignores-interval.patch index 787b1be..502ad94 100644 --- a/shiroha-server/minecraft-patches/features/0014-Fix-player-auto-saving-ignores-interval.patch +++ b/shiroha-server/minecraft-patches/features/0014-Fix-player-auto-saving-ignores-interval.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix player auto saving ignores interval diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index ada7dd26b52cd923bc78e6e6a513a2a1c592793d..1e40cc6f9bfd172a42a8f9624eb2fb554c6f11cf 100644 +index c29167dee1855b142c78d9ae8700b25d97301f12..1cafca1758e7fcac59a3b3dadf28b432da82e51a 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java @@ -208,7 +208,7 @@ import org.slf4j.Logger; diff --git a/shiroha-server/minecraft-patches/features/0015-Fix-dragon-part-desync.patch b/shiroha-server/minecraft-patches/features/0015-Fix-dragon-part-desync.patch index 2df47bb..5c9dc09 100644 --- a/shiroha-server/minecraft-patches/features/0015-Fix-dragon-part-desync.patch +++ b/shiroha-server/minecraft-patches/features/0015-Fix-dragon-part-desync.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix dragon part desync diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java -index b31b55f00e2ce1bd6c1011fe852bd1dbb37de524..772e07af051b0f88582434b4cfcba42a666ab7a0 100644 +index aa53138b3670a8337b639472a6ab5ce46702ff76..6be786dcd9f02c0b59ca90453ddabff936d1cfdf 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java -@@ -97,6 +97,7 @@ public final class ServerEntityLookup extends EntityLookup { +@@ -93,6 +93,7 @@ public final class ServerEntityLookup extends EntityLookup { if (entity instanceof ThrownEnderpearl enderpearl) { this.addEnderPearl(CoordinateUtils.getChunkKey(enderpearl.chunkPosition()), enderpearl.getId()); // Folia - region threading } @@ -17,10 +17,10 @@ index b31b55f00e2ce1bd6c1011fe852bd1dbb37de524..772e07af051b0f88582434b4cfcba42a } diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 65aa51503e49c72d3a588c4843eae6ab8992f782..c67963f6d514c7a967aea834fe243c5e009435b7 100644 +index 2a6854c4c3ca35807723853128edf16024abbeb7..cfc080a18816dd10edcf8a3171b18a5cb7174457 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -4459,6 +4459,7 @@ public abstract class Entity +@@ -4455,6 +4455,7 @@ public abstract class Entity Entity copy = this.getType().create(destination, EntitySpawnReason.DIMENSION_TRAVEL); copy.restoreFrom(this); copy.transform(pos, yaw, pitch, velocity); diff --git a/shiroha-server/minecraft-patches/features/0018-Fix-high-velocity-moving-issue.patch b/shiroha-server/minecraft-patches/features/0018-Fix-high-velocity-moving-issue.patch index 2d8b1ef..0856077 100644 --- a/shiroha-server/minecraft-patches/features/0018-Fix-high-velocity-moving-issue.patch +++ b/shiroha-server/minecraft-patches/features/0018-Fix-high-velocity-moving-issue.patch @@ -8,7 +8,7 @@ On folia, entity usually cannot move out of the tickregion, but sometimes it act Reference from : https://github.com/KaiijuMC/Kaiiju/blob/ver/1.20.1/patches/server/0040-Teleport-async-if-we-cannot-move-entity-off-main.patch diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index c67963f6d514c7a967aea834fe243c5e009435b7..4a5266e3e15e765dda4b2aac54bf0eb90291b096 100644 +index cfc080a18816dd10edcf8a3171b18a5cb7174457..3a9d52e8dbb8c4fee3c93213a5997282fa9d68ac 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -1163,6 +1163,19 @@ public abstract class Entity diff --git a/shiroha-server/minecraft-patches/features/0020-Fix-wrong-variable-passing-in-RegionizedWorldData.patch b/shiroha-server/minecraft-patches/features/0020-Fix-wrong-variable-passing-in-RegionizedWorldData.patch index 146fa09..a30ab7b 100644 --- a/shiroha-server/minecraft-patches/features/0020-Fix-wrong-variable-passing-in-RegionizedWorldData.patch +++ b/shiroha-server/minecraft-patches/features/0020-Fix-wrong-variable-passing-in-RegionizedWorldData.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix wrong variable passing in RegionizedWorldData diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java -index cb15cfbc684ae9e9d9634886f707c2df10063139..3333fc2a564531ece613ed2ac77db99c59ec7390 100644 +index c8f13da82c55cc5c1fe1c922a87e3eccb1117937..55dabe4dd77cff25ec9b1bc26749a1b56c36e2a2 100644 --- a/io/papermc/paper/threadedregions/RegionizedWorldData.java +++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java -@@ -706,7 +706,7 @@ public final class RegionizedWorldData { +@@ -720,7 +720,7 @@ public final class RegionizedWorldData { } public void setTickingBlockEntities(final boolean to) { diff --git a/shiroha-server/minecraft-patches/features/0023-Fix-folia-nether-portal-ticket-placement.patch b/shiroha-server/minecraft-patches/features/0023-Fix-folia-nether-portal-ticket-placement.patch index e25c2b2..0604fe0 100644 --- a/shiroha-server/minecraft-patches/features/0023-Fix-folia-nether-portal-ticket-placement.patch +++ b/shiroha-server/minecraft-patches/features/0023-Fix-folia-nether-portal-ticket-placement.patch @@ -30,10 +30,10 @@ index ea93ac07ec6d4e83d1d0904daf721132e2bbecc3..947413df55b972a5f866d5717fdb9e92 public static class IntBounds { diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 4a5266e3e15e765dda4b2aac54bf0eb90291b096..63c1d223d9fc16b4211e992bde3c9f08d3ed15ca 100644 +index 3a9d52e8dbb8c4fee3c93213a5997282fa9d68ac..9308201aaae9c419ed7b2edd09c334ffd8025f50 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -4723,7 +4723,7 @@ public abstract class Entity +@@ -4719,7 +4719,7 @@ public abstract class Entity portalInfoCompletable.complete( new TeleportTransition(destination, Vec3.atCenterOf(targetPos), Vec3.ZERO, 90.0f, 0.0f, @@ -42,7 +42,7 @@ index 4a5266e3e15e765dda4b2aac54bf0eb90291b096..63c1d223d9fc16b4211e992bde3c9f08 ); return; } -@@ -4735,7 +4735,7 @@ public abstract class Entity +@@ -4731,7 +4731,7 @@ public abstract class Entity portalInfoCompletable.complete( net.minecraft.world.level.block.NetherPortalBlock.createDimensionTransition( destination, portal, originalPortalDirection, relativePos, diff --git a/shiroha-server/minecraft-patches/features/0025-Force-disable-builtin-spark-plugin.patch b/shiroha-server/minecraft-patches/features/0025-Force-disable-builtin-spark-plugin.patch index 9a54607..5b9fd36 100644 --- a/shiroha-server/minecraft-patches/features/0025-Force-disable-builtin-spark-plugin.patch +++ b/shiroha-server/minecraft-patches/features/0025-Force-disable-builtin-spark-plugin.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Force disable builtin spark plugin The spark passed down from paper has some memory leaking issue, so we fully removed it from the code to prevent that memory leaking issue. diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index bb40ee426b09b5cc60f83145858651770b83685f..3e62b4beb0e5ada82f83b0ebec35ca21a072a2e2 100644 +index 743b12af380c7026e741abd43f227f52207a5342..d4cb160e285a807597523de840a4d1c4f9fced27 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -672,8 +672,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= emptyTickThreshold) { @@ -47,7 +47,7 @@ index bb40ee426b09b5cc60f83145858651770b83685f..3e62b4beb0e5ada82f83b0ebec35ca21 if (this.emptyTicks == emptyTickThreshold) { LOGGER.info("Server empty for {} seconds, pausing", this.pauseWhenEmptySeconds()); this.autoSave(); -@@ -1683,7 +1683,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -Date: Tue, 21 Apr 2026 01:41:14 +0800 +From: Bacteriawa +Date: Sat, 8 Aug 2026 11:36:52 +0800 Subject: [PATCH] Kaiiju: Entity tick and removal limiter Co-authored by: Xymb @@ -8,19 +8,19 @@ As part of: Kaiiju (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2e Licensed under: GPL-3.0 (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2ec408e6411e6f752379da/LICENSE) diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java -index 3333fc2a564531ece613ed2ac77db99c59ec7390..df9a8fba86b61d2d2f82e40e0f317cab84faa2ff 100644 +index 55dabe4dd77cff25ec9b1bc26749a1b56c36e2a2..fbbc05e946b72da1079271810fdb3034510c6280 100644 --- a/io/papermc/paper/threadedregions/RegionizedWorldData.java +++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java -@@ -354,6 +354,7 @@ public final class RegionizedWorldData { +@@ -349,6 +349,7 @@ public final class RegionizedWorldData { private final IteratorSafeOrderedReferenceSet navigatingMobs = new IteratorSafeOrderedReferenceSet<>(); - public final ReferenceList trackerEntities = new ReferenceList<>(EMPTY_ENTITY_ARRAY); // Moonrise - entity tracker - public final ReferenceList trackerUnloadedEntities = new ReferenceList<>(EMPTY_ENTITY_ARRAY); // Moonrise - entity tracker + public ReferenceList trackerEntities = new ReferenceList<>(EMPTY_ENTITY_ARRAY); // Moonrise - entity tracker + public boolean iteratingTrackerEntities; + public final dev.kaiijumc.kaiiju.KaiijuEntityThrottler entityThrottler = new dev.kaiijumc.kaiiju.KaiijuEntityThrottler(); // Kaiiju // block ticking private final ObjectLinkedOpenHashSet blockEvents = new ObjectLinkedOpenHashSet<>(); diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 878a00bb28223b2719b4ce7c5d715e0346364770..e89d2af26ffe83e71cfb733cfdbec542f845f4e5 100644 +index 01a93a747d2fec6248909165bd450833e72cc231..674ebe647a5e44bf7819e1e7a234164476b31e3d 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java @@ -912,6 +912,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet diff --git a/shiroha-server/minecraft-patches/features/0036-Kaiiju-Vanilla-end-portal-teleportation.patch b/shiroha-server/minecraft-patches/features/0036-Kaiiju-Vanilla-end-portal-teleportation.patch index 65433d8..ceb34bb 100644 --- a/shiroha-server/minecraft-patches/features/0036-Kaiiju-Vanilla-end-portal-teleportation.patch +++ b/shiroha-server/minecraft-patches/features/0036-Kaiiju-Vanilla-end-portal-teleportation.patch @@ -8,10 +8,10 @@ As part of: Kaiiju (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2e Licensed under: GPL-3.0 (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2ec408e6411e6f752379da/LICENSE) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 292b062f55b7f37346750ed3a59ed4fb64c92df8..06fa367e6ea5411bbb433153323867969de0156e 100644 +index 25a4ce7204c6e7f22a125b81de29be0980c258dd..9b5a0c19b5b5dd278ab7db831eef2a97010d7f58 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -4640,15 +4640,19 @@ public abstract class Entity +@@ -4636,15 +4636,19 @@ public abstract class Entity targetPos, 16, // load 16 blocks to be safe from block physics ca.spottedleaf.concurrentutil.util.Priority.HIGH, (chunks) -> { @@ -35,7 +35,7 @@ index 292b062f55b7f37346750ed3a59ed4fb64c92df8..06fa367e6ea5411bbb43315332386796 TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET), org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL, TeleportTransition.PassengerTeleportationMode.POSITION_RIDER -@@ -4664,13 +4668,17 @@ public abstract class Entity +@@ -4660,13 +4664,17 @@ public abstract class Entity ca.spottedleaf.concurrentutil.util.Priority.HIGH, (chunks) -> { BlockPos adjustedSpawn = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, spawnPos); @@ -56,7 +56,7 @@ index 292b062f55b7f37346750ed3a59ed4fb64c92df8..06fa367e6ea5411bbb43315332386796 TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET), org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL, TeleportTransition.PassengerTeleportationMode.POSITION_RIDER -@@ -4849,6 +4857,10 @@ public abstract class Entity +@@ -4845,6 +4853,10 @@ public abstract class Entity return false; } @@ -67,7 +67,7 @@ index 292b062f55b7f37346750ed3a59ed4fb64c92df8..06fa367e6ea5411bbb43315332386796 Vec3 initialPosition = this.position(); ChunkPos initialPositionChunk = new ChunkPos( ca.spottedleaf.moonrise.common.util.CoordinateUtils.getChunkX(initialPosition), -@@ -4912,9 +4924,14 @@ public abstract class Entity +@@ -4908,9 +4920,14 @@ public abstract class Entity info.postTeleportTransition().onTransition(teleported); } diff --git a/shiroha-server/minecraft-patches/features/0038-Add-config-for-server-mod-name.patch b/shiroha-server/minecraft-patches/features/0038-Add-config-for-server-mod-name.patch index a9c531c..024999f 100644 --- a/shiroha-server/minecraft-patches/features/0038-Add-config-for-server-mod-name.patch +++ b/shiroha-server/minecraft-patches/features/0038-Add-config-for-server-mod-name.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add config for server mod name diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 63fecdde56650fb056fa8de352abdf927b0549f8..3ecedf303384c172a5e2a19c9e6ac0c3a43cef74 100644 +index a7100db6d1ce6434cd9ecfdff554a4ebcfde1e66..28f5c28bdf9a3090b98451e559f807c4364ea259 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -2071,7 +2071,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop localPlayers = new CopyOnWriteArrayList<>(); diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 3ecedf303384c172a5e2a19c9e6ac0c3a43cef74..ee7fce1e4e9b94b1f9c956c376fff0abee51b0ca 100644 +index 28f5c28bdf9a3090b98451e559f807c4364ea259..170ff99a055d7ea582d6a18ef6acd57269d943c4 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1933,6 +1933,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop level + " " + level.dimension().identifier()); profiler.push("tick"); @@ -82,7 +82,7 @@ index 3ecedf303384c172a5e2a19c9e6ac0c3a43cef74..ee7fce1e4e9b94b1f9c956c376fff0ab try { foliaProfiler.startTimer(level.tickTimerId); try { // Folia - profiler -@@ -1947,6 +1950,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop regionToData, final ReferenceOpenHashSet dataSet) { @@ -121,7 +121,7 @@ index 7cbf93b183eaeb156467044ccdb2923e6d944438..2fb7f239cec94a94db05311e290c5078 // connections for (final Connection conn : from.connections) { final ServerPlayer player = conn.getPlayer(); -@@ -243,8 +310,9 @@ public final class RegionizedWorldData { +@@ -237,8 +304,9 @@ public final class RegionizedWorldData { from.fluidLevelTicks.split(chunkToRegionShift, levelTicksFluidRegionData); // tile entity ticking @@ -133,7 +133,7 @@ index 7cbf93b183eaeb156467044ccdb2923e6d944438..2fb7f239cec94a94db05311e290c5078 final int chunkX = pos.getX() >> 4; final int chunkZ = pos.getZ() >> 4; -@@ -254,8 +322,9 @@ public final class RegionizedWorldData { +@@ -248,8 +316,9 @@ public final class RegionizedWorldData { } // else: when a chunk unloads, it does not actually _remove_ the tile entity from the list, it just gets // marked as removed. So if there is no section, it's probably removed! } @@ -145,7 +145,7 @@ index 7cbf93b183eaeb156467044ccdb2923e6d944438..2fb7f239cec94a94db05311e290c5078 final int chunkX = pos.getX() >> 4; final int chunkZ = pos.getZ() >> 4; -@@ -483,6 +552,11 @@ public final class RegionizedWorldData { +@@ -478,6 +547,11 @@ public final class RegionizedWorldData { public final io.papermc.paper.redstone.RedstoneWireTurbo turbo; // Environment attribute system public Reference2ObjectOpenHashMap, EnvironmentAttributeSystem.ValueSampler> attributeSamplers; @@ -240,7 +240,7 @@ index 6e08d50794c4af4405f3e164a3fd46f376b3f78f..dd2d0940eece3e85078e574f66f71a4c int getContainerSize(); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index fb0fe5631e8fd5d1053e31e4f121601a64647f1b..6b736388138ff58daeffae6ada470b9045fd51b6 100644 +index de6a71616f62c0b1b373840102012cec06703081..ca042e76eb240e0f772dc39fb6aa41c2ceb19f63 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -324,7 +324,7 @@ public abstract class Entity @@ -252,7 +252,7 @@ index fb0fe5631e8fd5d1053e31e4f121601a64647f1b..6b736388138ff58daeffae6ada470b90 private final VecDeltaCodec packetPositionCodec = new VecDeltaCodec(); public boolean needsSync; public boolean syncPosition; -@@ -4467,11 +4467,13 @@ public abstract class Entity +@@ -4463,11 +4463,13 @@ public abstract class Entity } protected Entity transformForAsyncTeleport(ServerLevel destination, Vec3 pos, Float yaw, Float pitch, Vec3 velocity) { @@ -266,7 +266,7 @@ index fb0fe5631e8fd5d1053e31e4f121601a64647f1b..6b736388138ff58daeffae6ada470b90 if (copy instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon dragon) dragon.syncDragonPartsAfterTeleportTransform(); // Shiroha - Fix dragon part desync // vanilla code used to call remove _after_ copying, and some stuff is required to be after copy - so add hook here // for example, clearing of inventory after switching dimensions -@@ -6038,8 +6040,29 @@ public abstract class Entity +@@ -6034,8 +6036,29 @@ public abstract class Entity this.setBoundingBox(this.makeBoundingBox()); } // Paper end - Block invalid positions and bounding box diff --git a/shiroha-server/minecraft-patches/features/0056-Purpur-Lobotomize-stuck-villagers.patch b/shiroha-server/minecraft-patches/features/0056-Purpur-Lobotomize-stuck-villagers.patch index 9953fb7..476ca5d 100644 --- a/shiroha-server/minecraft-patches/features/0056-Purpur-Lobotomize-stuck-villagers.patch +++ b/shiroha-server/minecraft-patches/features/0056-Purpur-Lobotomize-stuck-villagers.patch @@ -8,7 +8,7 @@ As part of: Purpur (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18 Licensed under: MIT (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18f6d99ff389289766ec9d/LICENSE) diff --git a/net/minecraft/world/entity/npc/villager/Villager.java b/net/minecraft/world/entity/npc/villager/Villager.java -index f649c46cc9a34e646f8da3244866c6e011d30aa3..184637ac35a92097391f13bc6355f88495deb483 100644 +index 0869ecb4b7fe07efa33d521bef2f525955bd3c30..947094f64d1f2270377ad1e688bd0db503e1c76c 100644 --- a/net/minecraft/world/entity/npc/villager/Villager.java +++ b/net/minecraft/world/entity/npc/villager/Villager.java @@ -190,6 +190,53 @@ public class Villager extends AbstractVillager implements VillagerDataHolder, Re diff --git a/shiroha-server/minecraft-patches/features/0057-Pufferfish-Reduce-projectile-chunk-loading.patch b/shiroha-server/minecraft-patches/features/0057-Pufferfish-Reduce-projectile-chunk-loading.patch index afdfc33..ba8c84a 100644 --- a/shiroha-server/minecraft-patches/features/0057-Pufferfish-Reduce-projectile-chunk-loading.patch +++ b/shiroha-server/minecraft-patches/features/0057-Pufferfish-Reduce-projectile-chunk-loading.patch @@ -9,10 +9,10 @@ Original patch: https://github.com/pufferfish-gg/Pufferfish/blob/ver/1.21/puffer Original license(GPL-3.0): https://github.com/pufferfish-gg/Pufferfish/blob/ver/1.21/PATCH-LICENSE diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java -index 2fb7f239cec94a94db05311e290c507800b4f2c3..ddbcfcbe7345e3d2f6406962c34d57a39b5b9621 100644 +index 53970fff0c119b190195e07823d5796a99de9c3b..08e4adac3425a94f9bcf5191883d333cfe5bf5c9 100644 --- a/io/papermc/paper/threadedregions/RegionizedWorldData.java +++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java -@@ -408,6 +408,10 @@ public final class RegionizedWorldData { +@@ -402,6 +402,10 @@ public final class RegionizedWorldData { private RegionizedServer.WorldLevelData tickData; @@ -21,8 +21,8 @@ index 2fb7f239cec94a94db05311e290c507800b4f2c3..ddbcfcbe7345e3d2f6406962c34d57a3 + public long pufferfish$loadedTick = 0L; + // Shiroha end // connections - public final List connections = new ArrayList<>(); - + private static final Connection[] EMPTY_CONNECTION_ARRAY = new Connection[0]; + private final ReferenceList connections = new ReferenceList<>(EMPTY_CONNECTION_ARRAY); diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java index 721e3b083846fd363a31311196bc4c681969215c..cc3aebbd42a876fcc982a9bf1c3dc1bd11f3a4e0 100644 --- a/net/minecraft/world/entity/projectile/Projectile.java diff --git a/shiroha-server/minecraft-patches/features/0059-Leaf-Secure-seed-and-matter-seed-command.patch b/shiroha-server/minecraft-patches/features/0059-Leaf-Secure-seed-and-matter-seed-command.patch index 5bcb0cc..40f1684 100644 --- a/shiroha-server/minecraft-patches/features/0059-Leaf-Secure-seed-and-matter-seed-command.patch +++ b/shiroha-server/minecraft-patches/features/0059-Leaf-Secure-seed-and-matter-seed-command.patch @@ -63,7 +63,7 @@ index 7927769cf9bccb892745f4d1390eb83b2861d1bb..414c21345879f589fb61130180d0ca60 } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 52d74e9df3a01163014ae50ce4f49eba6639ec63..8c2d6a43b52ae6e70506bb779a9dfd33a7a1d440 100644 +index f2a00943b36f0cfb943bd40b5120ddbf8b7bcf7c..f95b0efc2f61a12eeb42c1a867ccdf87cb51a1a2 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java @@ -634,6 +634,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet diff --git a/shiroha-server/minecraft-patches/features/0062-Leaf-Remove-useless-creating-stats-json-bases-on-pla.patch b/shiroha-server/minecraft-patches/features/0062-Leaf-Remove-useless-creating-stats-json-bases-on-pla.patch index a470c3c..c64de23 100644 --- a/shiroha-server/minecraft-patches/features/0062-Leaf-Remove-useless-creating-stats-json-bases-on-pla.patch +++ b/shiroha-server/minecraft-patches/features/0062-Leaf-Remove-useless-creating-stats-json-bases-on-pla.patch @@ -9,7 +9,7 @@ As part of: Leaf (https://github.com/Winds-Studio/Leaf/blob/7f3e240bbe0970683c40 Licensed under: MIT (https://github.com/Winds-Studio/Leaf/blob/7f3e240bbe0970683c40279a7a65f0fde47503b6/licenses/MIT.txt) diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 9770ced361547b98179ec09dc85cea399f1a88cb..d9e22ca839e6ed756ff15597ba639113342d15e4 100644 +index fcfa2b7b6e8f4c00763b8c23d6eb2699aced3e75..7ee90d4a8d333c253077871cede3fed63ef23539 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java @@ -1294,22 +1294,26 @@ public abstract class PlayerList { diff --git a/shiroha-server/minecraft-patches/features/0065-Leaf-fast-bit-radix-sort.patch b/shiroha-server/minecraft-patches/features/0065-Leaf-fast-bit-radix-sort.patch index 9d7b661..986140e 100644 --- a/shiroha-server/minecraft-patches/features/0065-Leaf-fast-bit-radix-sort.patch +++ b/shiroha-server/minecraft-patches/features/0065-Leaf-fast-bit-radix-sort.patch @@ -8,10 +8,10 @@ This is a part of Leaf(https://github.com/Winds-Studio/Leaf/blob/d0ed97cf45dfa94 Original license: https://github.com/Winds-Studio/Leaf/blob/d0ed97cf45dfa94f686ef32f0eea1ec7323f78d5/LICENSE.md diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java -index ddbcfcbe7345e3d2f6406962c34d57a39b5b9621..15099b1a10723e2cddb582d153c8e8a59e7c067f 100644 +index 08e4adac3425a94f9bcf5191883d333cfe5bf5c9..e540458c7b21dd01c05012a82deee6a3ad613e24 100644 --- a/io/papermc/paper/threadedregions/RegionizedWorldData.java +++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java -@@ -530,6 +530,7 @@ public final class RegionizedWorldData { +@@ -525,6 +525,7 @@ public final class RegionizedWorldData { public final PathTypeCache pathTypesByPosCache = new PathTypeCache(); public final List temporaryChunkTickList = new java.util.ArrayList<>(); public final Set chunkHoldersToBroadcast = new ReferenceLinkedOpenHashSet<>(); diff --git a/shiroha-server/minecraft-patches/features/0066-Leaf-Configurable-vanilla-username-check.patch b/shiroha-server/minecraft-patches/features/0066-Leaf-Configurable-vanilla-username-check.patch index d1d3f67..9d95ea2 100644 --- a/shiroha-server/minecraft-patches/features/0066-Leaf-Configurable-vanilla-username-check.patch +++ b/shiroha-server/minecraft-patches/features/0066-Leaf-Configurable-vanilla-username-check.patch @@ -8,7 +8,7 @@ A part of Leaf(https://github.com/Winds-Studio/Leaf/blob/edb0504069139beaa6f39ef License: https://github.com/Winds-Studio/Leaf/blob/edb0504069139beaa6f39efa4702370c2576b3fc/LICENSE.md diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 87099cabe804741e6dc278bccdfa79b045e201fb..c9834a20b5c281c27922b4db1fd5bf43c93c4afb 100644 +index c4dddd5c66098301de2abc2de93d4409cd14531d..24ccb47605427f83bbfe552edf4d92e9c16e2a1f 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -217,7 +217,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop. diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 8c2d6a43b52ae6e70506bb779a9dfd33a7a1d440..5506018ee75eaf13d072969699a41566cf054cf5 100644 +index f95b0efc2f61a12eeb42c1a867ccdf87cb51a1a2..c79193fa5a12186d5f1ecb25abf92e2cb4a04f8d 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java @@ -1054,7 +1054,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet diff --git a/shiroha-server/minecraft-patches/features/0078-Gale-For-collision-check-has-physics-before-same-veh.patch b/shiroha-server/minecraft-patches/features/0078-Gale-For-collision-check-has-physics-before-same-veh.patch index 3c199fd..16476ad 100644 --- a/shiroha-server/minecraft-patches/features/0078-Gale-For-collision-check-has-physics-before-same-veh.patch +++ b/shiroha-server/minecraft-patches/features/0078-Gale-For-collision-check-has-physics-before-same-veh.patch @@ -20,7 +20,7 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin) Licensed under: GPL-3.0-only (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index fcca07953fb91d5b1b7230682b657ea289d779b7..e4dfb9dec23b1ac38e2f2de529d9683615e758a7 100644 +index df03f3407dea64c2ed4ace9bac96c4aa8281f25f..e3f79a6f8489694b1133a611931dcafeb1c79634 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -2438,8 +2438,8 @@ public abstract class Entity diff --git a/shiroha-server/minecraft-patches/features/0079-Gale-Skip-negligible-planar-movement-multiplication.patch b/shiroha-server/minecraft-patches/features/0079-Gale-Skip-negligible-planar-movement-multiplication.patch index 38c579c..c8c3694 100644 --- a/shiroha-server/minecraft-patches/features/0079-Gale-Skip-negligible-planar-movement-multiplication.patch +++ b/shiroha-server/minecraft-patches/features/0079-Gale-Skip-negligible-planar-movement-multiplication.patch @@ -7,7 +7,7 @@ License: GPL-3.0-only (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://github.com/GaleMC/Gale diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index e4dfb9dec23b1ac38e2f2de529d9683615e758a7..ab3bc9fea3fb5da4f851f4722fae77dd961f2e55 100644 +index e3f79a6f8489694b1133a611931dcafeb1c79634..c6b2baca40ed2a12cf5ae1032f4f610b335cc5af 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -1299,8 +1299,17 @@ public abstract class Entity diff --git a/shiroha-server/minecraft-patches/features/0082-Gale-Reduce-array-allocations.patch b/shiroha-server/minecraft-patches/features/0082-Gale-Reduce-array-allocations.patch index ac264f9..9e61f1b 100644 --- a/shiroha-server/minecraft-patches/features/0082-Gale-Reduce-array-allocations.patch +++ b/shiroha-server/minecraft-patches/features/0082-Gale-Reduce-array-allocations.patch @@ -27,7 +27,7 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack) Licensed under: GPL-3.0-only (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java -index 8d9ce3d301d5f7e4106587ae00adb8dd5b8b6f88..dd8a4e445928d93667702dedbd35ab3e0f94f3be 100644 +index 5b7ed8e5067683143c99473a126e17baa531903c..ece13c12b793ede92ec67850ab6d5a88fddb8afa 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java @@ -400,7 +400,6 @@ public final class ChunkEntitySlices { @@ -137,7 +137,7 @@ index 2e71a1cbabf3405e3e4fd5349a1784d895e7e60c..42de919064680b1a464d813976ca5e69 if (!itemStack.isEmpty()) { slots.add(Pair.of(slot, itemStack.copy())); diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index bbd6fed7f31a0806247ca140c868f323e6068a47..a52b205534dd77abe5ed657893efb9c5a89da543 100644 +index 306bac1feb35b2957a6acd2b394bdd3d500e6191..f169316ddef764a43ea38d8cdc017004d03e0a5f 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java @@ -1422,7 +1422,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @@ -150,10 +150,10 @@ index bbd6fed7f31a0806247ca140c868f323e6068a47..a52b205534dd77abe5ed657893efb9c5 this.getInventory().equipment.set(value, net.minecraft.world.item.ItemStack.EMPTY); } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9ed70554904b90fc686a6cf9039a7d24b6b040e1..c3fe81c7116a249a19a893e1b15214377f65b703 100644 +index be8d2a76ec1b93f6110f2a65c701bcbdc3dfe79d..b7f80b325ff796970f43dbc3ce47a811b140440d 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3022,7 +3022,7 @@ public class ServerGamePacketListenerImpl +@@ -3023,7 +3023,7 @@ public class ServerGamePacketListenerImpl // SPIGOT-7136 - Allays if (target instanceof net.minecraft.world.entity.animal.allay.Allay || target instanceof net.minecraft.world.entity.animal.equine.AbstractHorse) { // Paper - Fix horse armor desync ServerGamePacketListenerImpl.this.send(new net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket( @@ -287,7 +287,7 @@ index 9e4293c6df1851a852423b469577388d2254e169..952b09fba4cf7de90110a7aa4b96dc03 ItemStack itemStack = this.equipment.get(slot); // Paper if (!itemStack.isEmpty() && !EnchantmentHelper.has(itemStack, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) { diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index d3f60d6414786e0eab1c99c277f79a23abffe803..e5e5e1da691dc71dc806d3b039ff02b1fa50eacf 100644 +index 4e64eb78a4e3af2c23bdd9f61f77630b71ce97f4..bb2a62bfca35f19fd6721fea9610b3b5eb76a557 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java @@ -346,7 +346,7 @@ public abstract class Player extends Avatar implements ContainerUser { diff --git a/shiroha-server/minecraft-patches/features/0084-Frustum-filtering-tracker.patch b/shiroha-server/minecraft-patches/features/0084-Frustum-filtering-tracker.patch deleted file mode 100644 index 375d803..0000000 --- a/shiroha-server/minecraft-patches/features/0084-Frustum-filtering-tracker.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: NanaChiyo0721 -Date: Thu, 16 Jul 2026 23:04:23 +0800 -Subject: [PATCH] Frustum filtering tracker - - -diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java -index 163999d50213e0167eb09f0eae883388849f28fa..6059aa66b779d625ad1a4d4bdfe444a46cd9f3ab 100644 ---- a/net/minecraft/server/level/ChunkMap.java -+++ b/net/minecraft/server/level/ChunkMap.java -@@ -933,6 +933,7 @@ public class ChunkMap extends SimpleRegionStorage implements ChunkHolder.PlayerP - public void move(final ServerPlayer player) { - // Paper - optimise entity tracker - -+ if (player.culling != null) player.culling.updateFrustum(); // Shiroha - Frustum filtering tracker - SectionPos oldSection = player.getLastSectionPos(); - SectionPos newSection = SectionPos.of(player); - //boolean wasIgnored = this.playerMap.ignored(player); // Folia - region threading -@@ -1055,6 +1056,11 @@ public class ChunkMap extends SimpleRegionStorage implements ChunkHolder.PlayerP - final ca.spottedleaf.moonrise.patches.chunk_system.level.entity.server.ServerEntityLookup entityLookup = (ca.spottedleaf.moonrise.patches.chunk_system.level.entity.server.ServerEntityLookup)((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getEntityLookup();; - final ca.spottedleaf.moonrise.common.misc.NearbyPlayers nearbyPlayers = this.level.moonrise$getNearbyPlayers(); // Folia - region threading - -+ // Shiroha start - Frustum filtering tracker -+ for (var player : worldData.getLocalPlayers()) { -+ if (player.culling != null) player.culling.updateFrustum(); -+ } -+ // Shiroha end - Frustum filtering tracker - final ca.spottedleaf.moonrise.common.list.ReferenceList trackerEntities = worldData.trackerEntities; // Folia - region threading - final Entity[] trackerEntitiesRaw = trackerEntities.getRawDataUnchecked(); - for (int i = 0, len = totalEntities = trackerEntities.size(); i < len; ++i) { // Folia - region threading -@@ -1372,6 +1378,15 @@ public class ChunkMap extends SimpleRegionStorage implements ChunkHolder.PlayerP - if (visibleToPlayer && (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(player) || !player.getBukkitEntity().canSee(this.entity.getBukkitEntity()))) { // Paper - only consider hits // Folia - region threading - visibleToPlayer = false; - } -+ // Shiroha start - Frustum filtering tracker -+ if (player.culling != null) { -+ player.culling.far((float) Math.sqrt(distanceSquared)); -+ -+ if (visibleToPlayer && !player.isSpectator() && distanceSquared > (io.nanachiyo0721.shiroha.config.modules.optimizations.FrustumFilteringTrackerConfig.minForceVisibleDistance * io.nanachiyo0721.shiroha.config.modules.optimizations.FrustumFilteringTrackerConfig.minForceVisibleDistance)) { -+ visibleToPlayer = player.culling.isVisibleFor(this.entity.getBoundingBox()); -+ } -+ } -+ // Shiroha end - Frustum filtering tracker - // CraftBukkit end - if (visibleToPlayer) { - if (this.seenBy.add(player.connection)) { -diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index e5e5e1da691dc71dc806d3b039ff02b1fa50eacf..6a314d934e476cf2579034324950961cf35bac84 100644 ---- a/net/minecraft/world/entity/player/Player.java -+++ b/net/minecraft/world/entity/player/Player.java -@@ -186,6 +186,8 @@ public abstract class Player extends Avatar implements ContainerUser { - } - // CraftBukkit end - -+ public io.nanachiyo0721.shiroha.utils.Culling culling = io.nanachiyo0721.shiroha.config.modules.optimizations.FrustumFilteringTrackerConfig.enabled ? io.nanachiyo0721.shiroha.utils.Culling.fromConfig(this) : null; // Shiroha - Frustum filtering tracker -+ - public Player(final Level level, final GameProfile gameProfile) { - super(EntityTypes.PLAYER, level); - this.setUUID(gameProfile.id()); diff --git a/shiroha-server/minecraft-patches/features/0085-Lithium-optimized-collections-for-WeightedList.patch b/shiroha-server/minecraft-patches/features/0084-Lithium-optimized-collections-for-WeightedList.patch similarity index 100% rename from shiroha-server/minecraft-patches/features/0085-Lithium-optimized-collections-for-WeightedList.patch rename to shiroha-server/minecraft-patches/features/0084-Lithium-optimized-collections-for-WeightedList.patch diff --git a/shiroha-server/minecraft-patches/features/0086-Lithium-optimized-non-poi-block-searching.patch b/shiroha-server/minecraft-patches/features/0085-Lithium-optimized-non-poi-block-searching.patch similarity index 100% rename from shiroha-server/minecraft-patches/features/0086-Lithium-optimized-non-poi-block-searching.patch rename to shiroha-server/minecraft-patches/features/0085-Lithium-optimized-non-poi-block-searching.patch diff --git a/shiroha-server/minecraft-patches/features/0087-Lithium-skip-unnecessary-secondary-poi-sensing.patch b/shiroha-server/minecraft-patches/features/0086-Lithium-skip-unnecessary-secondary-poi-sensing.patch similarity index 94% rename from shiroha-server/minecraft-patches/features/0087-Lithium-skip-unnecessary-secondary-poi-sensing.patch rename to shiroha-server/minecraft-patches/features/0086-Lithium-skip-unnecessary-secondary-poi-sensing.patch index fb71e05..3ab6cdf 100644 --- a/shiroha-server/minecraft-patches/features/0087-Lithium-skip-unnecessary-secondary-poi-sensing.patch +++ b/shiroha-server/minecraft-patches/features/0086-Lithium-skip-unnecessary-secondary-poi-sensing.patch @@ -8,7 +8,7 @@ This is a part of lithium(https://github.com/CaffeineMC/lithium/blob/c42972b6e9d Original license: https://github.com/CaffeineMC/lithium/blob/c42972b6e9d21c8ff45559df6b271802050a22e2/LICENSE.md diff --git a/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java b/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java -index ec12508c112b1e7748a5d197b73a0d540bed10fc..a9e1c80d20f3ff9b7e68d617e3360fc786a6015d 100644 +index 7d3e843c2d3c5e15b7bea7302d6118419d3a4957..4c7326b3d6504038f7b359e37156f82b55ec7ccc 100644 --- a/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java +++ b/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java @@ -22,6 +22,12 @@ public class SecondaryPoiSensor extends Sensor { diff --git a/shiroha-server/paper-patches/features/0003-Force-disable-reload-command-and-api.patch b/shiroha-server/paper-patches/features/0003-Force-disable-reload-command-and-api.patch index 7a3ec2b..1c48711 100644 --- a/shiroha-server/paper-patches/features/0003-Force-disable-reload-command-and-api.patch +++ b/shiroha-server/paper-patches/features/0003-Force-disable-reload-command-and-api.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Force disable reload command and api diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9d0dc8815842a0583b212891680bd0c6461c30b9..fc789b5a4376db133558e698c65daddd9d8a4bd9 100644 +index 3fac32b420ce4ae74166eac43d38c51c1fd513cf..2ddb8d343c58e9005058dd50bfc6490b14402bed 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -981,6 +981,7 @@ public final class CraftServer implements Server { diff --git a/shiroha-server/paper-patches/features/0004-Force-disable-builtin-spark-plugin.patch b/shiroha-server/paper-patches/features/0004-Force-disable-builtin-spark-plugin.patch index bb984d7..845077f 100644 --- a/shiroha-server/paper-patches/features/0004-Force-disable-builtin-spark-plugin.patch +++ b/shiroha-server/paper-patches/features/0004-Force-disable-builtin-spark-plugin.patch @@ -18,7 +18,7 @@ index 9661f033bbb2c00073f1c891e1411c2a9943a37a..7ad9d8d4346781c928b93a45833b6570 return; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index fc789b5a4376db133558e698c65daddd9d8a4bd9..bec12eb481d305659c48205fe30677baba6fd091 100644 +index 2ddb8d343c58e9005058dd50bfc6490b14402bed..774997f11c8b50287c10e48c01278c4d995aae45 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -302,7 +302,7 @@ public final class CraftServer implements Server { diff --git a/shiroha-server/paper-patches/features/0006-Add-config-to-disable-async-catchers.patch b/shiroha-server/paper-patches/features/0006-Add-config-to-disable-async-catchers.patch index c6918f9..4f0ab94 100644 --- a/shiroha-server/paper-patches/features/0006-Add-config-to-disable-async-catchers.patch +++ b/shiroha-server/paper-patches/features/0006-Add-config-to-disable-async-catchers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add config to disable async catchers diff --git a/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java b/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java -index 6c74787321748702022787b65ff5465f8bcec4ad..bc77aa74fb21300d8b1c00723f0e30931caba54a 100644 +index 72a3478a98912caae8899df37218dd2a628a6e05..9c108fd09b0eeec22206cdec4ca861d0a35a5015 100644 --- a/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java +++ b/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java @@ -48,14 +48,14 @@ public class TickThread extends Thread { diff --git a/shiroha-server/paper-patches/features/0007-Add-config-to-avoid-of-folia-supported-check.patch b/shiroha-server/paper-patches/features/0007-Add-config-to-avoid-of-folia-supported-check.patch index 4c36a16..fdb7d38 100644 --- a/shiroha-server/paper-patches/features/0007-Add-config-to-avoid-of-folia-supported-check.patch +++ b/shiroha-server/paper-patches/features/0007-Add-config-to-avoid-of-folia-supported-check.patch @@ -34,10 +34,10 @@ index 6ef0042a355c65262bdb89dcf151bd644653216d..f009da59c9e54a6660d2f35104c56ac2 } // Folia end - block plugins not marked as supported diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 55a095e00bfe15321d8a1d69beb232e9956b0df7..5eec2a2a543099b11335427f7cac212523e21dab 100644 +index 804ea060fc5dc0d0ab89574a75604cdf911b4e6c..2bccd05d7c131ba98419007bb8688eddecf85643 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -323,7 +323,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -393,7 +393,7 @@ public final class CraftMagicNumbers implements UnsafeValues { } // Folia start - block plugins not marked as supported diff --git a/shiroha-server/paper-patches/features/0009-Add-status-bar.patch b/shiroha-server/paper-patches/features/0009-Add-status-bar.patch index 984fe1c..c0ee0e7 100644 --- a/shiroha-server/paper-patches/features/0009-Add-status-bar.patch +++ b/shiroha-server/paper-patches/features/0009-Add-status-bar.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MrHua269 -Date: Thu, 9 Jul 2026 12:12:08 +0800 +From: NanaChiyo0721 +Date: Sat, 8 Aug 2026 11:32:40 +0800 Subject: [PATCH] Add status bar @@ -22,12 +22,12 @@ index f020f310c4bca49a23de91bea72ccd9941c0b03c..10b351d8bd6b0e117ecbe961ae2f1016 + // KioCG end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a3f2e97c1e0c9c2add3c5efd5a5cebe84ace78bf..d47c1b8cc17eb13669fbe21670c3a6eaaa995844 100644 +index e20a66e56f2e4520b2708d6ebc377392e4362816..7bbadcab57d3a2dbba0a4c48de043966454a1d50 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3396,4 +3396,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa - super.knockback(strength, directionX, directionZ); - this.entity.hurtMarked = true; +@@ -3420,4 +3420,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa + this.getHandle().fixedPose = false; + this.getHandle().updatePlayerPose(); } + + // KioCG start - ChunkHot diff --git a/shiroha-server/paper-patches/features/0013-Leaf-Secure-seed-and-matter-seed-command.patch b/shiroha-server/paper-patches/features/0013-Leaf-Secure-seed-and-matter-seed-command.patch index 7cdd93c..264c8d8 100644 --- a/shiroha-server/paper-patches/features/0013-Leaf-Secure-seed-and-matter-seed-command.patch +++ b/shiroha-server/paper-patches/features/0013-Leaf-Secure-seed-and-matter-seed-command.patch @@ -25,10 +25,10 @@ index 10b351d8bd6b0e117ecbe961ae2f101686a38fe4..35137db138d8d14f9b9675ae51e135cb @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bec12eb481d305659c48205fe30677baba6fd091..f0c73d890df3b57336fa1c582447c0da9acdee78 100644 +index 774997f11c8b50287c10e48c01278c4d995aae45..f4eb1594a1af0a50dfbf7dacb1b58e3903913aa3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1261,7 +1261,11 @@ public final class CraftServer implements Server { +@@ -1260,7 +1260,11 @@ public final class CraftServer implements Server { .orElse(null); RegistryAccess contextRegistryAccess = registryAccess; if (worldGenSettings == null) {