I have this code to overlay block
public static void drawOutline(PoseStack poseStack, VoxelShape shape, double x, double y, double z, BlockPos pos){
Matrix4f matrix4f = poseStack.last().pose();
Tesselator tesselator = Tesselator.getInstance();
BufferBuilder bufferIn = tesselator.getBuilder();
RenderSystem.setShader(GameRenderer::getPositionShader);
RenderSystem.setShaderColor(0.0F, 0.0F, 0.25F, 1.0F);
RenderSystem.disableTexture();
bufferIn.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION);
shape.forAllEdges((x0, y0, z0, x1, y1, z1) -> {
bufferIn.vertex(matrix4f, (float)(x0 + x), (float)(y0 + y), (float)(z0 + z)).color(1.0f, 0.0f, 0.0f, 1.0f).normal(0, 0, 0).endVertex();
bufferIn.vertex(matrix4f, (float)(x1 + x), (float)(y1 + y), (float)(z1 + z)).color(1.0f, 0.0f, 0.0f, 1.0f).normal(0, 0, 0).endVertex();
});
tesselator.end();
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.enableTexture();
}
but i'm getting this result