9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 09:59:15 +00:00

fix reduce chunk source updates position check and mark experimental

This commit is contained in:
hayanesuru
2025-07-06 00:41:59 +09:00
parent becff2ac20
commit ee45897239
2 changed files with 14 additions and 17 deletions

View File

@@ -2,6 +2,7 @@ package org.dreeam.leaf.config.modules.opt;
import org.dreeam.leaf.config.ConfigModules;
import org.dreeam.leaf.config.EnumConfigCategory;
import org.dreeam.leaf.config.annotations.Experimental;
public class ReduceChunkSourceUpdates extends ConfigModules {
@@ -9,15 +10,20 @@ public class ReduceChunkSourceUpdates extends ConfigModules {
return EnumConfigCategory.PERF.getBaseKeyName() + ".reduce-chunk-source-updates";
}
@Experimental
public static boolean enabled = false;
@Override
public void onLoaded() {
enabled = config.getBoolean(getBasePath() + ".enabled", enabled,
config.pickStringRegionBased(
"Reduces chunk source updates on inter-chunk player moves.",
"减少玩家跨区块移动时的区块源更新。"
)
config.addCommentRegionBased(getBasePath(), """
*** Experimental Feature ***
Reduces chunk source updates on inter-chunk player moves.""", """
*** 实验性功能 ***
减少玩家跨区块移动时的区块源更新."""
);
enabled = config.getBoolean(getBasePath() + ".force-enabled", enabled);
if (config.getBoolean(getBasePath() + ".enabled", enabled)) {
LOGGER.warn("Disabled reduce-chunk-source-updates due to its experimental");
}
}
}