From b430e5075ea93422705537e497eb7b4800f10fdb Mon Sep 17 00:00:00 2001 From: deirn Date: Fri, 26 Jul 2024 22:06:35 +0700 Subject: [PATCH] fix build (cherry picked from commit 90dbd3c77bffc609426ca87af711521630616e10) --- .../plugin/vanilla/provider/BreakProgressProvider.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pluginVanilla/java/mcp/mobius/waila/plugin/vanilla/provider/BreakProgressProvider.java b/src/pluginVanilla/java/mcp/mobius/waila/plugin/vanilla/provider/BreakProgressProvider.java index d45d62c37..ec4a36b0c 100644 --- a/src/pluginVanilla/java/mcp/mobius/waila/plugin/vanilla/provider/BreakProgressProvider.java +++ b/src/pluginVanilla/java/mcp/mobius/waila/plugin/vanilla/provider/BreakProgressProvider.java @@ -29,7 +29,7 @@ public void onAfterTooltipRender(GuiGraphics ctx, Rectangle rect, ICommonAccesso var gameMode = Objects.requireNonNull(Minecraft.getInstance().gameMode); var gameModeAccess = (MultiPlayerGameModeAccess) gameMode; - var dt = Minecraft.getInstance().getTimer().getRealtimeDeltaTicks(); + var dt = Minecraft.getInstance().getDeltaFrameTime(); var isBreaking = gameMode.isDestroying(); var targetProgress = gameModeAccess.wthit_destroyProgress(); @@ -109,10 +109,10 @@ private void fill(GuiGraphics ctx, float x1, float y1, float x2, float y2, int c } var vertexConsumer = ctx.bufferSource().getBuffer(RenderType.gui()); - vertexConsumer.addVertex(matrix4f, x1, y1, 0f).setColor(color); - vertexConsumer.addVertex(matrix4f, x1, y2, 0f).setColor(color); - vertexConsumer.addVertex(matrix4f, x2, y2, 0f).setColor(color); - vertexConsumer.addVertex(matrix4f, x2, y1, 0f).setColor(color); + vertexConsumer.vertex(matrix4f, x1, y1, 0f).color(color).endVertex(); + vertexConsumer.vertex(matrix4f, x1, y2, 0f).color(color).endVertex(); + vertexConsumer.vertex(matrix4f, x2, y2, 0f).color(color).endVertex(); + vertexConsumer.vertex(matrix4f, x2, y1, 0f).color(color).endVertex(); } }