diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-03 01:24:24 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-03 01:24:24 +0100 |
commit | e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e (patch) | |
tree | fecc0322e48a399df7697da11adfb022d5641a6c /src/main/kotlin/util/render/FacingThePlayerContext.kt | |
parent | 646843ba3b960ac48f9866b3640438d3cc1dafc4 (diff) | |
download | Firmament-e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e.tar.gz Firmament-e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e.tar.bz2 Firmament-e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e.zip |
1.21.3 WIP
Diffstat (limited to 'src/main/kotlin/util/render/FacingThePlayerContext.kt')
-rw-r--r-- | src/main/kotlin/util/render/FacingThePlayerContext.kt | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/kotlin/util/render/FacingThePlayerContext.kt b/src/main/kotlin/util/render/FacingThePlayerContext.kt index eb37e35..daa8da9 100644 --- a/src/main/kotlin/util/render/FacingThePlayerContext.kt +++ b/src/main/kotlin/util/render/FacingThePlayerContext.kt @@ -76,13 +76,10 @@ class FacingThePlayerContext(val worldContext: RenderInWorldContext) { u1: Float, v1: Float, u2: Float, v2: Float, ) { - RenderSystem.setShaderTexture(0, texture) - RenderSystem.setShader(GameRenderer::getPositionTexColorProgram) + val buf = worldContext.vertexConsumers.getBuffer(RenderLayer.getGuiTexturedOverlay(texture)) val hw = width / 2F val hh = height / 2F val matrix4f: Matrix4f = worldContext.matrixStack.peek().positionMatrix - val buf = Tessellator.getInstance() - .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR) buf.vertex(matrix4f, -hw, -hh, 0F) .color(-1) .texture(u1, v1).next() @@ -95,7 +92,7 @@ class FacingThePlayerContext(val worldContext: RenderInWorldContext) { buf.vertex(matrix4f, +hw, -hh, 0F) .color(-1) .texture(u2, v1).next() - BufferRenderer.drawWithGlobalProgram(buf.end()) + worldContext.vertexConsumers.draw() } } |