9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-23 17:09:29 +00:00

Correct optimize-block-entities config name to keep consistency

Co-Authored-By: Pascalpex <68245106+Pascalpex@users.noreply.github.com>
This commit is contained in:
Dreeam
2025-06-10 12:26:14 +08:00
parent 985513a2f7
commit b4ad51dbb5
6 changed files with 40 additions and 27 deletions

View File

@@ -1,18 +0,0 @@
package org.dreeam.leaf.config.modules.opt;
import org.dreeam.leaf.config.ConfigModules;
import org.dreeam.leaf.config.EnumConfigCategory;
public class OptimiseBlockEntities extends ConfigModules {
public String getBasePath() {
return EnumConfigCategory.PERF.getBaseKeyName();
}
public static boolean enabled = true;
@Override
public void onLoaded() {
enabled = config.getBoolean(getBasePath() + ".optimise-block-entities", enabled);
}
}

View File

@@ -0,0 +1,24 @@
package org.dreeam.leaf.config.modules.opt;
import org.dreeam.leaf.config.ConfigModules;
import org.dreeam.leaf.config.EnumConfigCategory;
public class OptimizeBlockEntities extends ConfigModules {
public String getBasePath() {
return EnumConfigCategory.PERF.getBaseKeyName();
}
public static boolean enabled = true;
@Override
public void onLoaded() {
// Transfer old config
Boolean optimiseBlockEntities = config.getBoolean(getBasePath() + ".optimise-block-entities");
if (optimiseBlockEntities != null && optimiseBlockEntities) {
enabled = true;
}
enabled = config.getBoolean(getBasePath() + ".optimize-block-entities", enabled);
}
}

View File

@@ -17,6 +17,5 @@ public class OptimizePlayerMovementProcessing extends ConfigModules {
Whether to optimize player movement processing by skipping unnecessary edge checks and avoiding redundant view distance updates.""",
"""
是否优化玩家移动处理,跳过不必要的边缘检查并避免冗余的视距更新。"""));
}
}

View File

@@ -15,7 +15,7 @@ public class ReduceChunkSourceUpdates extends ConfigModules {
public void onLoaded() {
enabled = config.getBoolean(getBasePath() + ".enabled", enabled,
config.pickStringRegionBased(
"Reduces chunk source updates on inter-chunk player moves. (Recommended to enable)",
"Reduces chunk source updates on inter-chunk player moves.",
"减少玩家跨区块移动时的区块源更新。"
)
);