diff options
Diffstat (limited to 'src/main/kotlin/gui/BarComponent.kt')
| -rw-r--r-- | src/main/kotlin/gui/BarComponent.kt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/kotlin/gui/BarComponent.kt b/src/main/kotlin/gui/BarComponent.kt index da781da..751ea39 100644 --- a/src/main/kotlin/gui/BarComponent.kt +++ b/src/main/kotlin/gui/BarComponent.kt @@ -6,8 +6,10 @@ import io.github.notenoughupdates.moulconfig.common.RenderContext import io.github.notenoughupdates.moulconfig.gui.GuiComponent import io.github.notenoughupdates.moulconfig.gui.GuiImmediateContext import io.github.notenoughupdates.moulconfig.observer.GetSetter -import io.github.notenoughupdates.moulconfig.platform.ModernRenderContext +import io.github.notenoughupdates.moulconfig.platform.MoulConfigPlatform +import io.github.notenoughupdates.moulconfig.platform.MoulConfigRenderContext import me.shedaniel.math.Color +import net.minecraft.client.gl.RenderPipelines import net.minecraft.client.gui.DrawContext import net.minecraft.client.render.RenderLayer import net.minecraft.util.Identifier @@ -33,7 +35,7 @@ class BarComponent( ) { fun draw(context: DrawContext, x: Int, y: Int, width: Int, height: Int, color: Color) { context.drawTexturedQuad( - RenderLayer::getGuiTextured, + RenderPipelines.GUI_TEXTURED, identifier, x, y, x + width, x + height, u1, u2, v1, v2, @@ -81,7 +83,7 @@ class BarComponent( } override fun render(context: GuiImmediateContext) { - val renderContext = (context.renderContext as ModernRenderContext).drawContext + val renderContext = (context.renderContext as MoulConfigRenderContext).drawContext var i = 0 val x = 0 val y = 0 @@ -104,7 +106,6 @@ class BarComponent( (context.width - 4) * total.get() / context.width, total.get() ) - RenderSystem.setShaderColor(1F, 1F, 1F, 1F) } |
