This commit is contained in:
mcrcortex
2025-07-28 12:46:36 +10:00
parent 7b456e3d98
commit 454a5a0e11
3 changed files with 5 additions and 4 deletions

View File

@@ -497,7 +497,7 @@ public class ModelFactory {
int i = 0; int i = 0;
for (var entry : this.modelsRequiringBiomeColours) { for (var entry : this.modelsRequiringBiomeColours) {
var colourProvider = MinecraftClient.getInstance().getBlockColors().providers.get(Registries.BLOCK.getRawId(entry.getRight().getBlock())); var colourProvider = getColourProvider(entry.getRight().getBlock());
if (colourProvider == null) { if (colourProvider == null) {
throw new IllegalStateException(); throw new IllegalStateException();
} }

View File

@@ -17,6 +17,7 @@ import me.cortex.voxy.client.core.rendering.util.UploadStream;
import me.cortex.voxy.common.Logger; import me.cortex.voxy.common.Logger;
import me.cortex.voxy.common.util.AllocationArena; import me.cortex.voxy.common.util.AllocationArena;
import me.cortex.voxy.common.util.MemoryBuffer; import me.cortex.voxy.common.util.MemoryBuffer;
import me.cortex.voxy.common.util.UnsafeUtil;
import me.cortex.voxy.common.world.WorldEngine; import me.cortex.voxy.common.world.WorldEngine;
import me.cortex.voxy.common.world.WorldSection; import me.cortex.voxy.common.world.WorldSection;
import org.lwjgl.system.MemoryUtil; import org.lwjgl.system.MemoryUtil;
@@ -516,8 +517,8 @@ public class AsyncNodeManager {
int copies = upload.dataUploadPoints.size(); int copies = upload.dataUploadPoints.size();
int scratchSize = (int) upload.arena.getSize() * 8; int scratchSize = (int) upload.arena.getSize() * 8;
long ptr = UploadStream.INSTANCE.rawUploadAddress(scratchSize + copies * 16); long ptr = UploadStream.INSTANCE.rawUploadAddress(scratchSize + copies * 16);
MemoryUtil.memCopy(upload.scratchHeaderBuffer.address, UploadStream.INSTANCE.getBaseAddress() + ptr, copies * 16L); UnsafeUtil.memcpy(upload.scratchHeaderBuffer.address, UploadStream.INSTANCE.getBaseAddress() + ptr, copies * 16L);
MemoryUtil.memCopy(upload.scratchDataBuffer.address, UploadStream.INSTANCE.getBaseAddress() + ptr + copies * 16L, scratchSize); UnsafeUtil.memcpy(upload.scratchDataBuffer.address, UploadStream.INSTANCE.getBaseAddress() + ptr + copies * 16L, scratchSize);
UploadStream.INSTANCE.commit();//Commit the buffer UploadStream.INSTANCE.commit();//Commit the buffer
this.multiMemcpy.bind(); this.multiMemcpy.bind();

View File

@@ -138,7 +138,7 @@ bool isCulledByHiz() {
int ml = int(miplevel); int ml = int(miplevel);
ssize = max(ivec2(1), ssize>>ml); ssize = max(ivec2(1), ssize>>ml);
ivec2 mxbb = ivec2(maxBB.xy*ssize); ivec2 mxbb = min(ivec2(maxBB.xy*ssize),ssize-1);
ivec2 mnbb = ivec2(minBB.xy*ssize); ivec2 mnbb = ivec2(minBB.xy*ssize);
float pointSample = -1.0f; float pointSample = -1.0f;