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

Optimize fluidOnEyes update

Co-Authored-By: MrlingXD <90316914+wling-art@users.noreply.github.com>
This commit is contained in:
Dreeam
2025-06-28 10:37:38 +08:00
parent 655dd89c95
commit 35471da55b
130 changed files with 330 additions and 189 deletions

View File

@@ -16,4 +16,5 @@ public final class ArrayConstants {
public static final org.bukkit.entity.Entity[] emptyBukkitEntityArray = new org.bukkit.entity.Entity[0];
public static final net.minecraft.world.entity.Entity[] emptyEntityArray = new net.minecraft.world.entity.Entity[0];
//public static final net.minecraft.server.level.ServerLevel[] emptyServerLevelArray = new net.minecraft.server.level.ServerLevel[0];
public static final net.minecraft.tags.TagKey[] emptyTagKeyArray = new net.minecraft.tags.TagKey[0]; // Leaf - Optimize isEyeInFluid
}

View File

@@ -1,21 +0,0 @@
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 方法启用缓存,以优化性能并减少内存使用."));
}
}