random dep cleanup

This commit is contained in:
mcrcortex
2025-05-15 23:15:10 +10:00
parent 9bc0f46be9
commit 802b853b75
2 changed files with 2 additions and 4 deletions

View File

@@ -15,7 +15,6 @@ import me.cortex.voxy.client.core.util.ExpandingObjectAllocationList;
import me.cortex.voxy.common.Logger; import me.cortex.voxy.common.Logger;
import me.cortex.voxy.common.util.MemoryBuffer; import me.cortex.voxy.common.util.MemoryBuffer;
import me.cortex.voxy.common.world.WorldEngine; import me.cortex.voxy.common.world.WorldEngine;
import net.caffeinemc.mods.sodium.client.util.MathUtil;
import org.lwjgl.system.MemoryUtil; import org.lwjgl.system.MemoryUtil;
import java.util.List; import java.util.List;
@@ -111,7 +110,7 @@ public class NodeManager {
} }
public NodeManager(int maxNodeCount, IGeometryManager geometryManager, ISectionWatcher watcher) { 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"); throw new IllegalArgumentException("Max node count must be a power of 2");
} }
if (maxNodeCount>(1<<24)) { if (maxNodeCount>(1<<24)) {

View File

@@ -1,7 +1,6 @@
package me.cortex.voxy.client.core.rendering.section.geometry; package me.cortex.voxy.client.core.rendering.section.geometry;
import me.cortex.voxy.client.core.rendering.building.BuiltSection; import me.cortex.voxy.client.core.rendering.building.BuiltSection;
import net.caffeinemc.mods.sodium.client.util.MathUtil;
import java.util.function.Consumer; import java.util.function.Consumer;
@@ -12,7 +11,7 @@ public abstract class AbstractSectionGeometryManager implements IGeometryManager
public final int maxSections; public final int maxSections;
public final long geometryCapacity; public final long geometryCapacity;
protected AbstractSectionGeometryManager(int maxSections, 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"); throw new IllegalArgumentException("Max sections should be a power of 2");
} }
this.maxSections = maxSections; this.maxSections = maxSections;