9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 01:49:16 +00:00

Remove unnecessary LeafBootstrap (#445)

This commit is contained in:
Pascalpex
2025-08-05 21:10:45 +02:00
committed by GitHub
parent 6f25343ddb
commit 9eda3f5aeb
71 changed files with 54 additions and 86 deletions

View File

@@ -1,18 +0,0 @@
package org.dreeam.leaf;
import io.papermc.paper.PaperBootstrap;
import joptsimple.OptionSet;
public class LeafBootstrap {
public static final boolean enableFMA = Boolean.getBoolean("Leaf.enableFMA"); // Leaf - Optimize Entity distanceTo
public static void boot(final OptionSet options) {
//runPreBootTasks();
PaperBootstrap.boot(options);
}
private static void runPreBootTasks() {
}
}

View File

@@ -1,7 +1,6 @@
package org.dreeam.leaf.config.modules.opt;
import gg.pufferfish.pufferfish.simd.SIMDDetection;
import org.dreeam.leaf.LeafBootstrap;
import org.dreeam.leaf.config.ConfigModules;
import org.dreeam.leaf.config.EnumConfigCategory;
import org.dreeam.leaf.config.annotations.Experimental;
@@ -19,7 +18,7 @@ public class OptimizeDespawn extends ConfigModules {
enabled = config.getBoolean(getBasePath(), enabled);
if (enabled) {
gg.pufferfish.pufferfish.simd.SIMDDetection.initialize();
if (!LeafBootstrap.enableFMA || !SIMDDetection.isEnabled()) {
if (!Boolean.getBoolean("Leaf.enableFMA") || !SIMDDetection.isEnabled()) {
LOGGER.info("NOTE: Recommend enabling FMA and Vector API to work with optimize-mob-despawn.");
}
}

View File

@@ -12,7 +12,6 @@ import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.MobCategory;
import net.minecraft.world.level.entity.EntityTickList;
import org.bukkit.event.entity.EntityRemoveEvent;
import org.dreeam.leaf.LeafBootstrap;
import java.util.Map;
import java.util.OptionalInt;
@@ -22,7 +21,7 @@ public final class DespawnMap {
private static final double[] EMPTY_DOUBLES = {};
private static final long[] EMPTY_LONGS = {};
private static final int[] EMPTY_INTS = {};
static final boolean FMA = LeafBootstrap.enableFMA;
static final boolean FMA = Boolean.getBoolean("Leaf.enableFMA");
private static final boolean SIMD = SIMDDetection.isEnabled();
private static final int LEAF_THRESHOLD = SIMD ? DespawnVectorAPI.DOUBLE_VECTOR_LENGTH : 4;
private static final int INITIAL_CAP = 8;