Skip to content

Commit fe21538

Browse files
committed
Fix clipping when blocks are directly against edges of fields
1 parent fd7f21e commit fe21538

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/robotgryphon/compactcrafting/client/render/FieldProjectorRenderer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,12 @@ private void renderProjectionCube(FieldProjectorTile tile, MatrixStack mx, IRend
265265

266266
IVertexBuilder builder = buffers.getBuffer(RenderTypesExtensions.PROJECTION_FIELD_RENDERTYPE);
267267

268-
drawCube(builder, mx, cube, colorProjectionCube);
268+
double expansion = 0.0001;
269+
AxisAlignedBB slightlyBiggerBecauseFoxes = cube
270+
.expand(expansion, expansion, expansion)
271+
.expand(-expansion, -expansion, -expansion);
272+
273+
drawCube(builder, mx, slightlyBiggerBecauseFoxes, colorProjectionCube);
269274

270275
mx.pop();
271276
}

0 commit comments

Comments
 (0)