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(); } }