Skip to content

Commit 0e98f95

Browse files
committed
fix: Inverted rect crashing on 1.21.5
1 parent b298842 commit 0e98f95

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modern/1.21.5/src/main/kotlin/io/github/notenoughupdates/moulconfig/platform/ModernRenderContext.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,11 @@ class ModernRenderContext(val drawContext: DrawContext) : RenderContext {
176176
drawContext.draw {
177177
val matrix = drawContext.matrices.peek().positionMatrix
178178
val buffer = it.getBuffer(INVERTED_RECT)
179-
buffer.vertex(matrix, left, bottom, 0F).next()
180-
buffer.vertex(matrix, right, bottom, 0F).next()
181-
buffer.vertex(matrix, right, top, 0F).next()
182-
buffer.vertex(matrix, left, top, 0F).next()
179+
val blue = 0xFF0000FF.toInt()
180+
buffer.vertex(matrix, left, bottom, 0F).color(blue).next()
181+
buffer.vertex(matrix, right, bottom, 0F).color(blue).next()
182+
buffer.vertex(matrix, right, top, 0F).color(blue).next()
183+
buffer.vertex(matrix, left, top, 0F).color(blue).next()
183184
}
184185
}
185186

0 commit comments

Comments
 (0)