Files
Shiroha/shiroha-server/minecraft-patches/features/0047-Add-experimental-config-for-command-block-command-ex.patch
T
NanaChiyo0721 1bb895c165
Shiroha CI / build (push) Canceled after 0s
Shiroha CI / Event File (push) Canceled after 0s
Fix incorrect ticket lock size computing
Yeah this would fully solve the issue of chunk unloading race condition

The same fix was already initially added at "Force clamp grid-exponent to 1~6"
2026-08-09 14:57:32 +08:00

20 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrHua269 <mrhua269@gmail.com>
Date: Wed, 8 Jul 2026 23:39:10 +0800
Subject: [PATCH] Add experimental config for command block command execution
diff --git a/net/minecraft/world/level/BaseCommandBlock.java b/net/minecraft/world/level/BaseCommandBlock.java
index 31f1583f29eebe5e13b5a7ac5116fdafc3592e5c..8050ab7b4348782456d576b482d2fcb4fce23b25 100644
--- a/net/minecraft/world/level/BaseCommandBlock.java
+++ b/net/minecraft/world/level/BaseCommandBlock.java
@@ -91,7 +91,7 @@ public abstract class BaseCommandBlock {
}
public boolean performCommand(final ServerLevel level) {
- if (true) return false; // Folia - region threading
+ if (!io.nanachiyo0721.shiroha.config.modules.experiment.CommandConfig.commandBlock) return false; // Folia - region threading // Shiroha - Add experimental config for command block command execution
if (level.getGameTime() == this.lastExecution) {
return false;
}