Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly prevent block face culling when TS is active #796

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Properly prevent block face culling when TS is active
  • Loading branch information
embeddedt committed Dec 16, 2024
commit 5a1e532420ea429c1459594d5af4d41406dcdee8
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ public ChunkMeshData createMesh(BlockRenderPass pass, float x, float y, float z,

if (sortTranslucent && pass.isTranslucent()) {
ChunkBufferSorter.sortStandardFormat(vertexType, buffer, bufferLen, x, y, z);
meshData.clearSlices();
meshData.setModelSlice(ModelQuadFacing.UNASSIGNED, new BufferSlice(0, bufferLen));
}

meshData.setVertexData(new VertexData(buffer, this.vertexType.getCustomVertexFormat()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ public void setVertexData(VertexData vertexData) {
this.vertexData = vertexData;
}

public void clearSlices() {
this.parts.clear();
}

public void setModelSlice(ModelQuadFacing facing, BufferSlice slice) {
this.parts.put(facing, slice);
}
Expand Down
Loading