9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-26 02:19:19 +00:00

Only tick items at hand

This commit is contained in:
Taiyou06
2025-05-09 23:56:41 +02:00
parent 01a465c759
commit 7d9865678b
2 changed files with 66 additions and 0 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 OptimizeItemTicking extends ConfigModules {
public String getBasePath() {
return EnumConfigCategory.PERF.getBaseKeyName();
}
public static boolean onlyTickItemsInHand = true;
@Override
public void onLoaded() {
onlyTickItemsInHand = config.getBoolean(getBasePath() + ".only-tick-items-in-hand", onlyTickItemsInHand, config.pickStringRegionBased("""
Whether to only tick/update items in main hand and offhand instead of the entire inventory.""",
"""
是否只对主手和副手中的物品进行tick/更新,而不是整个物品栏中的所有物品。"""));
}
}