diff --git a/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/DefaultChunkRenderer.java b/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/DefaultChunkRenderer.java index 52a77bc4dd..c41ec330c5 100644 --- a/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/DefaultChunkRenderer.java +++ b/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/DefaultChunkRenderer.java @@ -166,6 +166,7 @@ private static void addDrawCommands(MultiDrawBatch batch, long pMeshData, int ma if (indexDataOffset != 0) { // * 4 to convert to bytes (the buffer contains ints) // the section render data storage for the indices stores the offset in indices (also called elements) + // the << 3 is * 8 to convert to 8 byte offsets MemoryUtil.memPutAddress(pElementPointer + (size << 3), indexDataOffset << 2); // adding the number of elements works because the index data has one index per element (which are the indices) diff --git a/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/RenderSection.java b/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/RenderSection.java index d31ed4ea6e..85cb4f38b4 100644 --- a/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/RenderSection.java +++ b/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/RenderSection.java @@ -51,7 +51,6 @@ public class RenderSection { @Nullable private TranslucentData translucentData; // TODO: is this the right category? - // Pending Update State @Nullable private CancellationToken taskCancellationToken = null; @@ -344,10 +343,8 @@ public void setPendingUpdate(@Nullable ChunkUpdateType type) { this.pendingUpdateType = type; } - public void prepareTrigger(boolean isAngleTrigger) { - - this.translucentData.prepareTrigger(isAngleTrigger); - + public void prepareTrigger(boolean isDirectTrigger) { + this.translucentData.prepareTrigger(isDirectTrigger); } public int getLastUploadFrame() { diff --git a/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/RenderSectionManager.java b/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/RenderSectionManager.java index 7ad3b8728d..ba1f08b6e2 100644 --- a/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/RenderSectionManager.java +++ b/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/RenderSectionManager.java @@ -492,7 +492,7 @@ public int getVisibleChunkCount() { return sections; } - public void scheduleSort(long sectionPos, boolean isAngleTrigger) { + public void scheduleSort(long sectionPos, boolean isDirectTrigger) { // TODO: Does this need to invalidate the section cache? RenderSection section = this.sectionByPosition.get(sectionPos); @@ -505,7 +505,7 @@ public void scheduleSort(long sectionPos, boolean isAngleTrigger) { pendingUpdate = ChunkUpdateType.getPromotionUpdateType(section.getPendingUpdate(), pendingUpdate); if (pendingUpdate != null) { section.setPendingUpdate(pendingUpdate); - section.prepareTrigger(isAngleTrigger); + section.prepareTrigger(isDirectTrigger); } } }