Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public final class PrimitiveCollectorImpl implements PrimitiveCollector {
private List<OutlinedCircleRenderState> outlinedCircleStates = null;
private boolean frozen = false;

private static final double DELTA = 0.0005;

public PrimitiveCollectorImpl(LevelRenderState worldState, Frustum frustum) {
this.worldState = worldState;
this.frustum = frustum;
Expand Down Expand Up @@ -144,7 +146,8 @@ private void submitBeaconBeam(BlockPos pos, float[] colourComponents) {

@Override
public void submitOutlinedBox(BlockPos pos, float[] colourComponents, float lineWidth, boolean throughWalls) {
submitOutlinedBox(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1, colourComponents, 1f, lineWidth, throughWalls);
// Only this function needs a delta, in order to fix z-fighting with the block outline
submitOutlinedBox(pos.getX() - DELTA, pos.getY() - DELTA, pos.getZ() - DELTA, pos.getX() + 1 + DELTA, pos.getY() + 1 + DELTA, pos.getZ() + 1 + DELTA, colourComponents, 1f, lineWidth, throughWalls);
}

@Override
Expand Down