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

Optimize isEyeInFluid (#327)

* Optimize isEyeInFluid

* Remove accidental formatting

* Fix code removed by oblivion

* Optimize isEyeInFluid

* Update after rebase
This commit is contained in:
LingXD
2025-05-21 23:54:32 +08:00
committed by GitHub
parent 0a26ea4078
commit e5da1b1038
3 changed files with 104 additions and 6 deletions

View File

@@ -0,0 +1,21 @@
package org.dreeam.leaf.config.modules.opt;
import org.dreeam.leaf.config.ConfigModules;
import org.dreeam.leaf.config.EnumConfigCategory;
public class EyeFluidCache extends ConfigModules {
public String getBasePath() {
return EnumConfigCategory.PERF.getBaseKeyName();
}
public static boolean enabled = false;
@Override
public void onLoaded() {
enabled = config.getBoolean(getBasePath() + ".cache-eye-fluid-status", enabled,
config.pickStringRegionBased(
"Whether to cache the isEyeInFluid method to improve performance and reduce memory usage.",
"是否为 isEyeInFluid 方法启用缓存,以优化性能并减少内存使用."));
}
}