From 16bf98a4ed78821d5bdae52978fed7b348cbdeae Mon Sep 17 00:00:00 2001 From: deirn Date: Mon, 12 Aug 2024 01:17:15 +0700 Subject: [PATCH] fix forge server crash, somehow --- platform/forge/build.gradle.kts | 1 + .../waila/plugin/vanilla/provider/BreakProgressProvider.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/forge/build.gradle.kts b/platform/forge/build.gradle.kts index e8def29e9..afdb93961 100644 --- a/platform/forge/build.gradle.kts +++ b/platform/forge/build.gradle.kts @@ -60,6 +60,7 @@ minecraft { ideaModule("${rootProject.name}.${project.name}.main") source(sourceSets["main"]) + source(sourceSets["api"]) source(sourceSets["plugin"]) rootProject.sourceSets.forEach { source(it) } } 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 2ef563d76..91270de34 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 @@ -4,10 +4,10 @@ import java.util.Objects; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.BufferBuilder; import com.mojang.blaze3d.vertex.DefaultVertexFormat; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.Tesselator; -import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.blaze3d.vertex.VertexFormat; import mcp.mobius.waila.api.ICommonAccessor; import mcp.mobius.waila.api.IEventListener; @@ -110,7 +110,7 @@ public void onAfterTooltipRender(PoseStack matrices, Rectangle rect, ICommonAcce if (isInDelay) progressDelayTimer -= dt; } - private void fill(PoseStack matrices, VertexConsumer vertexConsumer, float x1, float y1, float x2, float y2, int color) { + private void fill(PoseStack matrices, BufferBuilder vertexConsumer, float x1, float y1, float x2, float y2, int color) { var matrix4f = matrices.last().pose(); if (x1 < x2) { var o = x1;