tweek setting
This commit is contained in:
@@ -4,6 +4,7 @@ import com.google.gson.FieldNamingPolicy;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import me.cortex.voxy.common.Logger;
|
||||
import me.cortex.voxy.common.util.cpu.CpuLayout;
|
||||
import me.cortex.voxy.commonImpl.VoxyCommon;
|
||||
import net.caffeinemc.mods.sodium.client.gui.options.storage.OptionStorage;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
@@ -27,7 +28,7 @@ public class VoxyConfig implements OptionStorage<VoxyConfig> {
|
||||
public boolean enableRendering = true;
|
||||
public boolean ingestEnabled = true;
|
||||
public int sectionRenderDistance = 16;
|
||||
public int serviceThreads = Math.max(Runtime.getRuntime().availableProcessors()/2, 1);
|
||||
public int serviceThreads = Math.max(CpuLayout.CORES.length/2, 1);
|
||||
public float subDivisionSize = 64;
|
||||
public boolean renderVanillaFog = false;
|
||||
public boolean renderStatistics = false;
|
||||
|
||||
@@ -7,6 +7,7 @@ import me.cortex.voxy.client.RenderStatistics;
|
||||
import me.cortex.voxy.client.VoxyClientInstance;
|
||||
import me.cortex.voxy.client.core.IGetVoxyRenderSystem;
|
||||
import me.cortex.voxy.common.Logger;
|
||||
import me.cortex.voxy.common.util.cpu.CpuLayout;
|
||||
import me.cortex.voxy.commonImpl.IVoxyWorld;
|
||||
import me.cortex.voxy.commonImpl.VoxyCommon;
|
||||
import net.caffeinemc.mods.sodium.client.gui.SodiumOptionsGUI;
|
||||
@@ -60,7 +61,10 @@ public abstract class VoxyConfigScreenPages {
|
||||
).add(OptionImpl.createBuilder(int.class, storage)
|
||||
.setName(Text.translatable("voxy.config.general.serviceThreads"))
|
||||
.setTooltip(Text.translatable("voxy.config.general.serviceThreads.tooltip"))
|
||||
.setControl(opt->new SliderControl(opt, 1, Runtime.getRuntime().availableProcessors(), 1, v->Text.literal(Integer.toString(v))))
|
||||
.setControl(opt->new SliderControl(opt, 1,
|
||||
CpuLayout.CORES.length, //Just do core size as max
|
||||
//Runtime.getRuntime().availableProcessors(),//Note: this is threads not cores, the default value is half the core count, is fine as this should technically be the limit but CpuLayout.CORES.length is more realistic
|
||||
1, v->Text.literal(Integer.toString(v))))
|
||||
.setBinding((s, v)->{
|
||||
boolean wasEnabled = VoxyCommon.getInstance() != null;
|
||||
var vrsh = (IGetVoxyRenderSystem) MinecraftClient.getInstance().worldRenderer;
|
||||
|
||||
@@ -53,6 +53,7 @@ public class RenderService<T extends AbstractSectionRenderer<J, Q>, J extends Vi
|
||||
geometryCapacity = Math.min(geometryCapacity, limit);
|
||||
}
|
||||
//geometryCapacity = 1<<24;
|
||||
//geometryCapacity = 1<<30;//1GB test
|
||||
return geometryCapacity;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,8 @@ public class WorldEngine {
|
||||
return this.sectionTracker.acquire(pos, true);
|
||||
}
|
||||
|
||||
public static final int POS_FORMAT_VERSION = 1;
|
||||
|
||||
//TODO: Fixme/optimize, cause as the lvl gets higher, the size of x,y,z gets smaller so i can dynamically compact the format
|
||||
// depending on the lvl, which should optimize colisions and whatnot
|
||||
public static long getWorldSectionId(int lvl, int x, int y, int z) {
|
||||
|
||||
Reference in New Issue
Block a user