Skip to content

Commit 0160161

Browse files
committed
fix: texture and color on 1.8.9 not always being applied correctly
1 parent 6414f32 commit 0160161

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

legacy/src/main/java/io/github/notenoughupdates/moulconfig/internal/ForgeRenderContext.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class ForgeRenderContext : RenderContext {
6767
GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0)
6868
worldrenderer.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION)
6969

70+
applyGlobalColor(color)
7071
require(coordinates.size % 6 == 0)
7172
for (i in 0 until (coordinates.size / 2)) {
7273
worldrenderer.pos(coordinates[i * 2].toDouble(), coordinates[i * 2 + 1].toDouble(), 0.0).endVertex()
@@ -116,6 +117,7 @@ class ForgeRenderContext : RenderContext {
116117
override fun drawTexturedTintedRect(texture: MyResourceLocation, x: Float, y: Float, width: Float, height: Float, u1: Float, v1: Float, u2: Float, v2: Float, color: Int, filter: TextureFilter) {
117118
FilterAssertionCache.assertTextureFilter(texture, filter)
118119
applyGlobalColor(color)
120+
Minecraft.getMinecraft().textureManager.bindTexture(ForgeMinecraft.fromMyResourceLocation(texture))
119121
RenderUtils.drawTexturedRect(
120122
x, y,
121123
width, height,

0 commit comments

Comments
 (0)