From 802b853b75ea9761d5edb1304a31bdffb1212a27 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Thu, 15 May 2025 23:15:10 +1000 Subject: [PATCH] random dep cleanup --- .../voxy/client/core/rendering/hierachical/NodeManager.java | 3 +-- .../section/geometry/AbstractSectionGeometryManager.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/hierachical/NodeManager.java b/src/main/java/me/cortex/voxy/client/core/rendering/hierachical/NodeManager.java index f86cd326..96127803 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/hierachical/NodeManager.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/hierachical/NodeManager.java @@ -15,7 +15,6 @@ import me.cortex.voxy.client.core.util.ExpandingObjectAllocationList; import me.cortex.voxy.common.Logger; import me.cortex.voxy.common.util.MemoryBuffer; import me.cortex.voxy.common.world.WorldEngine; -import net.caffeinemc.mods.sodium.client.util.MathUtil; import org.lwjgl.system.MemoryUtil; import java.util.List; @@ -111,7 +110,7 @@ public class NodeManager { } public NodeManager(int maxNodeCount, IGeometryManager geometryManager, ISectionWatcher watcher) { - if (!MathUtil.isPowerOfTwo(maxNodeCount)) { + if ((maxNodeCount&(maxNodeCount-1))!=0) { throw new IllegalArgumentException("Max node count must be a power of 2"); } if (maxNodeCount>(1<<24)) { diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/section/geometry/AbstractSectionGeometryManager.java b/src/main/java/me/cortex/voxy/client/core/rendering/section/geometry/AbstractSectionGeometryManager.java index cd8c75b2..3714fa40 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/section/geometry/AbstractSectionGeometryManager.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/section/geometry/AbstractSectionGeometryManager.java @@ -1,7 +1,6 @@ package me.cortex.voxy.client.core.rendering.section.geometry; import me.cortex.voxy.client.core.rendering.building.BuiltSection; -import net.caffeinemc.mods.sodium.client.util.MathUtil; import java.util.function.Consumer; @@ -12,7 +11,7 @@ public abstract class AbstractSectionGeometryManager implements IGeometryManager public final int maxSections; public final long geometryCapacity; protected AbstractSectionGeometryManager(int maxSections, long geometryCapacity) { - if (!MathUtil.isPowerOfTwo(maxSections)) {//TODO: Maybe not do this, as it isnt a strict requirement + if ((maxSections&(maxSections-1))!=0) {//TODO: Maybe not do this, as it isnt a strict requirement throw new IllegalArgumentException("Max sections should be a power of 2"); } this.maxSections = maxSections;