aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorronald <inglettronald@gmail.com>2023-07-26 19:14:56 -0500
committerronald <inglettronald@gmail.com>2023-07-26 19:14:56 -0500
commit2687d89171a56eba900b94f6e2812ecd402f0c3b (patch)
treed3e2e719ff438b2aea97833f9eeeca3b2c91c3ae /src
parent226256a9732074a0ee3605417985f412a9e117c9 (diff)
downloadDulkirMod-Fabric-2687d89171a56eba900b94f6e2812ecd402f0c3b.tar.gz
DulkirMod-Fabric-2687d89171a56eba900b94f6e2812ecd402f0c3b.tar.bz2
DulkirMod-Fabric-2687d89171a56eba900b94f6e2812ecd402f0c3b.zip
fixed
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/com/dulkirfabric/util/render/WorldRenderUtils.kt16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/util/render/WorldRenderUtils.kt b/src/main/kotlin/com/dulkirfabric/util/render/WorldRenderUtils.kt
index e6f58df..54ccd01 100644
--- a/src/main/kotlin/com/dulkirfabric/util/render/WorldRenderUtils.kt
+++ b/src/main/kotlin/com/dulkirfabric/util/render/WorldRenderUtils.kt
@@ -370,16 +370,18 @@ object WorldRenderUtils {
} else {
RenderSystem.enableDepthTest()
}
+ RenderSystem.setShader(GameRenderer::getPositionColorProgram)
+ RenderSystem.enableBlend()
+ RenderSystem.defaultBlendFunc()
+
val matrices = context.matrixStack()
+ val tes = Tessellator.getInstance()
+ tes.buffer.begin(VertexFormat.DrawMode.TRIANGLE_STRIP, VertexFormats.POSITION_COLOR)
matrices.push()
- val vertexConsumers = context.worldRenderer().bufferBuilders.entityVertexConsumers
- val vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getDebugFilledBox())
-
- matrices.translate(-context.camera().pos.x, -context.camera().pos.y, -context.camera().pos.z)
-
- WorldRenderer.renderFilledBox(matrices, vertexConsumer, x, y, z, x + width, y + height, z + depth,
+ matrices.translate(x - context.camera().pos.x, y - context.camera().pos.y, z - context.camera().pos.z)
+ WorldRenderer.renderFilledBox(matrices, tes.buffer, 0.0, 0.0, 0.0, width, height, depth,
color.red.toFloat(), color.green.toFloat(), color.blue.toFloat(), color.alpha.toFloat())
- vertexConsumers.draw()
+ tes.draw()
RenderSystem.enableDepthTest()
matrices.pop()
}