From ffa13bd95189b4f63f06de7a1b4a53a3a851a4f6 Mon Sep 17 00:00:00 2001 From: Alexander01998 Date: Wed, 29 May 2024 20:46:12 +0200 Subject: [PATCH] Update to 1.21-pre1 --- .../java/net/wurstclient/ai/PathRenderer.java | 8 +- .../wurstclient/altmanager/AltRenderer.java | 4 +- .../altmanager/screens/AltEditorScreen.java | 4 +- .../altmanager/screens/AltManagerScreen.java | 11 +- .../net/wurstclient/clickgui/ClickGui.java | 59 ++++----- .../components/ComboBoxComponent.java | 8 +- .../clickgui/components/FeatureButton.java | 8 +- .../clickgui/components/RadarComponent.java | 5 +- .../net/wurstclient/hacks/BaseFinderHack.java | 36 +++--- .../net/wurstclient/hacks/CaveFinderHack.java | 36 ++++-- .../net/wurstclient/hacks/FreecamHack.java | 4 +- .../net/wurstclient/hacks/ItemEspHack.java | 4 +- .../wurstclient/hacks/MobSpawnEspHack.java | 29 +++-- .../net/wurstclient/hacks/SearchHack.java | 36 ++++-- .../net/wurstclient/hacks/SkinDerpHack.java | 1 + .../net/wurstclient/hacks/TunnellerHack.java | 120 ++++++++++-------- .../hacks/autofarm/AutoFarmRenderer.java | 31 ++++- .../hacks/autofish/AutoFishDebugDraw.java | 4 +- .../hacks/autolibrarian/BookOffer.java | 2 +- .../hacks/chestesp/ChestEspRenderer.java | 4 +- .../newchunks/NewChunksChunkRenderer.java | 1 + .../newchunks/NewChunksOutlineRenderer.java | 5 +- .../newchunks/NewChunksReasonsRenderer.java | 1 + .../hacks/newchunks/NewChunksRenderer.java | 7 + .../newchunks/NewChunksSquareRenderer.java | 3 +- .../hacks/portalesp/PortalEspRenderer.java | 4 +- .../net/wurstclient/hacks/treebot/Tree.java | 5 +- .../java/net/wurstclient/hud/WurstLogo.java | 4 +- .../mixin/BackgroundRendererMixin.java | 1 + .../net/wurstclient/mixin/CameraMixin.java | 3 +- .../mixin/DisconnectedScreenMixin.java | 5 +- .../navigator/NavigatorFeatureScreen.java | 8 +- .../navigator/NavigatorMainScreen.java | 12 +- .../navigator/NavigatorScreen.java | 4 +- .../java/net/wurstclient/util/ListWidget.java | 45 +++---- .../net/wurstclient/util/RenderUtils.java | 33 ++--- src/main/resources/fabric.mod.json | 6 +- 37 files changed, 319 insertions(+), 242 deletions(-) diff --git a/src/main/java/net/wurstclient/ai/PathRenderer.java b/src/main/java/net/wurstclient/ai/PathRenderer.java index edb8570ffd..626e7eba0e 100644 --- a/src/main/java/net/wurstclient/ai/PathRenderer.java +++ b/src/main/java/net/wurstclient/ai/PathRenderer.java @@ -29,8 +29,8 @@ public static void renderArrow(MatrixStack matrixStack, BlockPos start, { Tessellator tessellator = RenderSystem.renderThreadTesselator(); RenderSystem.setShader(GameRenderer::getPositionProgram); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); int startX = start.getX() - region.x(); int startY = start.getY(); @@ -112,8 +112,8 @@ public static void renderNode(MatrixStack matrixStack, BlockPos pos, Tessellator tessellator = RenderSystem.renderThreadTesselator(); RenderSystem.setShader(GameRenderer::getPositionProgram); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); // middle part bufferBuilder.vertex(matrix, 0, 0, 1); diff --git a/src/main/java/net/wurstclient/altmanager/AltRenderer.java b/src/main/java/net/wurstclient/altmanager/AltRenderer.java index 1d984414af..4c85d301f6 100644 --- a/src/main/java/net/wurstclient/altmanager/AltRenderer.java +++ b/src/main/java/net/wurstclient/altmanager/AltRenderer.java @@ -67,8 +67,8 @@ private static void drawTexture(DrawContext context, int x, int y, float u, RenderSystem.setShader(GameRenderer::getPositionTexProgram); MatrixStack matrixStack = context.getMatrices(); Matrix4f matrix4f = matrixStack.peek().getPositionMatrix(); - BufferBuilder bufferBuilder = Tessellator.getInstance().begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE); + BufferBuilder bufferBuilder = Tessellator.getInstance() + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE); bufferBuilder.vertex(matrix4f, x, y, z).texture(uOverFw, vOverFh); bufferBuilder.vertex(matrix4f, x, y2, z).texture(uOverFw, vPlusHOverFh); bufferBuilder.vertex(matrix4f, x2, y2, z).texture(uPlusWOverFw, diff --git a/src/main/java/net/wurstclient/altmanager/screens/AltEditorScreen.java b/src/main/java/net/wurstclient/altmanager/screens/AltEditorScreen.java index 7b2ad6d07a..4c54f11147 100644 --- a/src/main/java/net/wurstclient/altmanager/screens/AltEditorScreen.java +++ b/src/main/java/net/wurstclient/altmanager/screens/AltEditorScreen.java @@ -384,8 +384,8 @@ public void render(DrawContext context, int mouseX, int mouseY, RenderSystem.setShaderColor(1, 0, 0, errorTimer / 16F); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); bufferBuilder.vertex(matrix, 0, 0, 0); bufferBuilder.vertex(matrix, width, 0, 0); bufferBuilder.vertex(matrix, width, height, 0); diff --git a/src/main/java/net/wurstclient/altmanager/screens/AltManagerScreen.java b/src/main/java/net/wurstclient/altmanager/screens/AltManagerScreen.java index a72ccb90a5..5d97b2cbd0 100644 --- a/src/main/java/net/wurstclient/altmanager/screens/AltManagerScreen.java +++ b/src/main/java/net/wurstclient/altmanager/screens/AltManagerScreen.java @@ -459,8 +459,8 @@ public void render(DrawContext context, int mouseX, int mouseY, RenderSystem.setShaderColor(1, 0, 0, errorTimer / 16F); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); bufferBuilder.vertex(matrix, 0, 0, 0); bufferBuilder.vertex(matrix, width, 0, 0); bufferBuilder.vertex(matrix, width, height, 0); @@ -660,14 +660,13 @@ protected void renderItem(DrawContext context, int id, int x, int y, RenderSystem.setShaderColor(0, 1, 0, opacity); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); bufferBuilder.vertex(matrix, x - 2, y - 2, 0); bufferBuilder.vertex(matrix, x - 2 + 220, y - 2, 0); bufferBuilder.vertex(matrix, x - 2 + 220, y - 2 + 30, 0); bufferBuilder.vertex(matrix, x - 2, y - 2 + 30, 0); - BufferRenderer - .drawWithGlobalProgram(bufferBuilder.end()); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_BLEND); diff --git a/src/main/java/net/wurstclient/clickgui/ClickGui.java b/src/main/java/net/wurstclient/clickgui/ClickGui.java index 78336b26b8..e17d1ae438 100644 --- a/src/main/java/net/wurstclient/clickgui/ClickGui.java +++ b/src/main/java/net/wurstclient/clickgui/ClickGui.java @@ -676,8 +676,8 @@ private void renderWindow(DrawContext context, Window window, int mouseX, RenderSystem.setShaderColor(bgColor[0], bgColor[1], bgColor[2], opacity); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); bufferBuilder.vertex(matrix, xs2, ys1, 0); bufferBuilder.vertex(matrix, xs2, ys2, 0); bufferBuilder.vertex(matrix, xs3, ys2, 0); @@ -690,8 +690,7 @@ private void renderWindow(DrawContext context, Window window, int mouseX, bufferBuilder.vertex(matrix, xs1, ys2, 0); bufferBuilder.vertex(matrix, xs2, ys2, 0); bufferBuilder.vertex(matrix, xs2, ys4, 0); - BufferRenderer - .drawWithGlobalProgram(bufferBuilder.end()); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); boolean hovering = mouseX >= xs1 && mouseY >= ys3 && mouseX < xs2 && mouseY < ys4; @@ -700,29 +699,27 @@ private void renderWindow(DrawContext context, Window window, int mouseX, RenderSystem.setShaderColor(acColor[0], acColor[1], acColor[2], hovering ? opacity * 1.5F : opacity); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, + VertexFormats.POSITION); bufferBuilder.vertex(matrix, xs1, ys3, 0); bufferBuilder.vertex(matrix, xs1, ys4, 0); bufferBuilder.vertex(matrix, xs2, ys4, 0); bufferBuilder.vertex(matrix, xs2, ys3, 0); - BufferRenderer - .drawWithGlobalProgram(bufferBuilder.end()); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); // outline RenderSystem.setShaderColor(acColor[0], acColor[1], acColor[2], 0.5F); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINE_STRIP, - VertexFormats.POSITION); + bufferBuilder = + tessellator.begin(VertexFormat.DrawMode.DEBUG_LINE_STRIP, + VertexFormats.POSITION); bufferBuilder.vertex(matrix, xs1, ys3, 0); bufferBuilder.vertex(matrix, xs1, ys4, 0); bufferBuilder.vertex(matrix, xs2, ys4, 0); bufferBuilder.vertex(matrix, xs2, ys3, 0); bufferBuilder.vertex(matrix, xs1, ys3, 0); - BufferRenderer - .drawWithGlobalProgram(bufferBuilder.end()); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); } int x3 = x1 + 2; @@ -735,8 +732,8 @@ private void renderWindow(DrawContext context, Window window, int mouseX, RenderSystem.setShaderColor(bgColor[0], bgColor[1], bgColor[2], opacity); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); bufferBuilder.vertex(matrix, x1, y3, 0); bufferBuilder.vertex(matrix, x1, y2, 0); bufferBuilder.vertex(matrix, x3, y2, 0); @@ -759,8 +756,8 @@ private void renderWindow(DrawContext context, Window window, int mouseX, RenderSystem.setShaderColor(bgColor[0], bgColor[1], bgColor[2], opacity); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, + VertexFormats.POSITION); // window background // between children @@ -825,8 +822,8 @@ private void renderWindow(DrawContext context, Window window, int mouseX, if(!window.isMinimized()) { // title bar outline - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.DEBUG_LINES, + VertexFormats.POSITION); bufferBuilder.vertex(matrix, x1, y3, 0); bufferBuilder.vertex(matrix, x2, y3, 0); BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); @@ -970,8 +967,8 @@ private void renderMinimizeButton(MatrixStack matrixStack, int x1, int y1, } // arrow - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, xa1, ya1, 0); bufferBuilder.vertex(matrix, xa3, ya1, 0); bufferBuilder.vertex(matrix, xa2, ya2, 0); @@ -1009,8 +1006,8 @@ private void renderPinButton(MatrixStack matrixStack, int x1, int y1, // knob RenderSystem.setShaderColor(h, 0, 0, 0.5F); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); bufferBuilder.vertex(matrix, xk1, yk1, 0); bufferBuilder.vertex(matrix, xk2, yk1, 0); bufferBuilder.vertex(matrix, xk2, yk2, 0); @@ -1028,8 +1025,8 @@ private void renderPinButton(MatrixStack matrixStack, int x1, int y1, // needle RenderSystem.setShaderColor(h, h, h, 1); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, + VertexFormats.POSITION); bufferBuilder.vertex(matrix, xn1, yn1, 0); bufferBuilder.vertex(matrix, xn2, yn1, 0); bufferBuilder.vertex(matrix, xn2, yn2, 0); @@ -1082,8 +1079,8 @@ private void renderPinButton(MatrixStack matrixStack, int x1, int y1, // knob RenderSystem.setShaderColor(0, h, 0, 1); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); bufferBuilder.vertex(matrix, xk1, yk1, 0); bufferBuilder.vertex(matrix, xk2, yk2, 0); bufferBuilder.vertex(matrix, xk3, yk3, 0); @@ -1103,8 +1100,8 @@ private void renderPinButton(MatrixStack matrixStack, int x1, int y1, // needle RenderSystem.setShaderColor(h, h, h, 1); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.TRIANGLES, + VertexFormats.POSITION); bufferBuilder.vertex(matrix, xn1, yn1, 0); bufferBuilder.vertex(matrix, xn2, yn2, 0); bufferBuilder.vertex(matrix, xn3, yn3, 0); @@ -1181,8 +1178,8 @@ private void renderCloseButton(MatrixStack matrixStack, int x1, int y1, // outline RenderSystem.setShaderColor(0.0625F, 0.0625F, 0.0625F, 0.5F); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.DEBUG_LINES, + VertexFormats.POSITION); bufferBuilder.vertex(matrix, xc1, yc1, 0); bufferBuilder.vertex(matrix, xc2, yc2, 0); bufferBuilder.vertex(matrix, xc6, yc5, 0); diff --git a/src/main/java/net/wurstclient/clickgui/components/ComboBoxComponent.java b/src/main/java/net/wurstclient/clickgui/components/ComboBoxComponent.java index d6c4a23f3f..6ba454e70b 100644 --- a/src/main/java/net/wurstclient/clickgui/components/ComboBoxComponent.java +++ b/src/main/java/net/wurstclient/clickgui/components/ComboBoxComponent.java @@ -205,8 +205,8 @@ private void drawSeparator(MatrixStack matrixStack, int x3, int y1, int y2) Matrix4f matrix = matrixStack.peek().getPositionMatrix(); Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, x3, y1, 0); bufferBuilder.vertex(matrix, x3, y2, 0); BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); @@ -238,8 +238,8 @@ private void drawArrow(MatrixStack matrixStack, int x2, int x3, int y1, } // arrow - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, xa1, ya1, 0); bufferBuilder.vertex(matrix, xa3, ya1, 0); bufferBuilder.vertex(matrix, xa2, ya2, 0); diff --git a/src/main/java/net/wurstclient/clickgui/components/FeatureButton.java b/src/main/java/net/wurstclient/clickgui/components/FeatureButton.java index 634a6312d6..3f2989dfac 100644 --- a/src/main/java/net/wurstclient/clickgui/components/FeatureButton.java +++ b/src/main/java/net/wurstclient/clickgui/components/FeatureButton.java @@ -235,8 +235,8 @@ private void drawSeparator(MatrixStack matrixStack, int x3, int y1, int y2) Tessellator tessellator = RenderSystem.renderThreadTesselator(); // separator - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, x3, y1, 0); bufferBuilder.vertex(matrix, x3, y2, 0); BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); @@ -268,8 +268,8 @@ private void drawSettingsArrow(MatrixStack matrixStack, int x2, int x3, } // arrow - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, xa1, ya1, 0); bufferBuilder.vertex(matrix, xa3, ya1, 0); bufferBuilder.vertex(matrix, xa2, ya2, 0); diff --git a/src/main/java/net/wurstclient/clickgui/components/RadarComponent.java b/src/main/java/net/wurstclient/clickgui/components/RadarComponent.java index 1d5ccd1b95..6f5b795f58 100644 --- a/src/main/java/net/wurstclient/clickgui/components/RadarComponent.java +++ b/src/main/java/net/wurstclient/clickgui/components/RadarComponent.java @@ -16,6 +16,7 @@ import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.BufferRenderer; +import net.minecraft.client.render.BuiltBuffer; import net.minecraft.client.render.GameRenderer; import net.minecraft.client.render.Tessellator; import net.minecraft.client.render.VertexFormat; @@ -190,7 +191,9 @@ else if(e instanceof AnimalEntity || e instanceof AmbientEntity middleY + (float)renderY + 0.5F, 0) .color(red, green, blue, alpha); } - BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); + BuiltBuffer buffer = bufferBuilder.endNullable(); + if(buffer != null) + BufferRenderer.drawWithGlobalProgram(buffer); } @Override diff --git a/src/main/java/net/wurstclient/hacks/BaseFinderHack.java b/src/main/java/net/wurstclient/hacks/BaseFinderHack.java index b07835a3d8..b3d5bb2473 100644 --- a/src/main/java/net/wurstclient/hacks/BaseFinderHack.java +++ b/src/main/java/net/wurstclient/hacks/BaseFinderHack.java @@ -16,6 +16,7 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.client.gl.ShaderProgram; import net.minecraft.client.gl.VertexBuffer; import net.minecraft.client.render.BufferBuilder; @@ -200,23 +201,28 @@ public void onUpdate() if(modulo == 0 || !region.equals(lastRegion)) { if(vertexBuffer != null) + { vertexBuffer.close(); + vertexBuffer = null; + } - vertexBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); - - Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); - - for(int[] vertex : vertices) - bufferBuilder.vertex(vertex[0] - region.x(), vertex[1], - vertex[2] - region.z()); - - BuiltBuffer buffer = bufferBuilder.end(); - - vertexBuffer.bind(); - vertexBuffer.upload(buffer); - VertexBuffer.unbind(); + if(!vertices.isEmpty()) + { + Tessellator tessellator = RenderSystem.renderThreadTesselator(); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + + for(int[] vertex : vertices) + bufferBuilder.vertex(vertex[0] - region.x(), vertex[1], + vertex[2] - region.z()); + + BuiltBuffer buffer = bufferBuilder.end(); + + vertexBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); + vertexBuffer.bind(); + vertexBuffer.upload(buffer); + VertexBuffer.unbind(); + } lastRegion = region; } diff --git a/src/main/java/net/wurstclient/hacks/CaveFinderHack.java b/src/main/java/net/wurstclient/hacks/CaveFinderHack.java index 143c72f84c..1f6cdb6a25 100644 --- a/src/main/java/net/wurstclient/hacks/CaveFinderHack.java +++ b/src/main/java/net/wurstclient/hacks/CaveFinderHack.java @@ -19,6 +19,7 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.block.Blocks; import net.minecraft.client.gl.ShaderProgram; import net.minecraft.client.gl.VertexBuffer; @@ -253,24 +254,31 @@ else if(notify) private void setBufferFromTask() { - Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator - .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); - + ArrayList vertices = compileVerticesTask.join(); RegionPos region = RenderUtils.getCameraRegion(); - for(int[] vertex : compileVerticesTask.join()) - bufferBuilder.vertex(vertex[0] - region.x(), vertex[1], - vertex[2] - region.z()); - - BuiltBuffer buffer = bufferBuilder.end(); - if(vertexBuffer != null) + { vertexBuffer.close(); + vertexBuffer = null; + } - vertexBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); - vertexBuffer.bind(); - vertexBuffer.upload(buffer); - VertexBuffer.unbind(); + if(!vertices.isEmpty()) + { + Tessellator tessellator = RenderSystem.renderThreadTesselator(); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + + for(int[] vertex : vertices) + bufferBuilder.vertex(vertex[0] - region.x(), vertex[1], + vertex[2] - region.z()); + + BuiltBuffer buffer = bufferBuilder.end(); + + vertexBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); + vertexBuffer.bind(); + vertexBuffer.upload(buffer); + VertexBuffer.unbind(); + } bufferUpToDate = true; bufferRegion = region; diff --git a/src/main/java/net/wurstclient/hacks/FreecamHack.java b/src/main/java/net/wurstclient/hacks/FreecamHack.java index 023387f19b..40378213dc 100644 --- a/src/main/java/net/wurstclient/hacks/FreecamHack.java +++ b/src/main/java/net/wurstclient/hacks/FreecamHack.java @@ -215,8 +215,8 @@ public void onRender(MatrixStack matrixStack, float partialTicks) Tessellator tessellator = RenderSystem.renderThreadTesselator(); RenderSystem.setShader(GameRenderer::getPositionProgram); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, (float)start.x, (float)start.y, (float)start.z); bufferBuilder.vertex(matrix, (float)end.x, (float)end.y, (float)end.z); diff --git a/src/main/java/net/wurstclient/hacks/ItemEspHack.java b/src/main/java/net/wurstclient/hacks/ItemEspHack.java index 138a691226..fbe4f4e372 100644 --- a/src/main/java/net/wurstclient/hacks/ItemEspHack.java +++ b/src/main/java/net/wurstclient/hacks/ItemEspHack.java @@ -172,8 +172,8 @@ private void renderTracers(MatrixStack matrixStack, float partialTicks, Vec3d start = RotationUtils.getClientLookVec(partialTicks) .add(RenderUtils.getCameraPos()).subtract(regionVec); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); for(ItemEntity e : items) { Vec3d end = EntityUtils.getLerpedBox(e, partialTicks).getCenter() diff --git a/src/main/java/net/wurstclient/hacks/MobSpawnEspHack.java b/src/main/java/net/wurstclient/hacks/MobSpawnEspHack.java index a7dc3d9cf8..bc10af12f7 100644 --- a/src/main/java/net/wurstclient/hacks/MobSpawnEspHack.java +++ b/src/main/java/net/wurstclient/hacks/MobSpawnEspHack.java @@ -7,7 +7,13 @@ */ package net.wurstclient.hacks; -import java.util.*; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.ConcurrentModificationException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.stream.Collectors; @@ -16,6 +22,7 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.block.BlockState; import net.minecraft.client.gl.ShaderProgram; import net.minecraft.client.gl.VertexBuffer; @@ -294,15 +301,17 @@ private void compileBuffer() RegionPos region = RegionPos.of(chunk.getPos()); if(vertexBuffer != null) + { vertexBuffer.close(); + vertexBuffer = null; + } - vertexBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); Tessellator tessellator = RenderSystem.renderThreadTesselator(); BufferBuilder bufferBuilder = tessellator.begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION_COLOR); - new ArrayList<>(red).stream().filter(Objects::nonNull) + new ArrayList<>(red).stream() .map(pos -> new BlockPos(pos.getX() - region.x(), pos.getY(), pos.getZ() - region.z())) .forEach(pos -> { @@ -319,7 +328,7 @@ private void compileBuffer() .color(1, 0, 0, 0.5F); }); - new ArrayList<>(yellow).stream().filter(Objects::nonNull) + new ArrayList<>(yellow).stream() .map(pos -> new BlockPos(pos.getX() - region.x(), pos.getY(), pos.getZ() - region.z())) .forEach(pos -> { @@ -336,10 +345,14 @@ private void compileBuffer() .color(1, 1, 0, 0.5F); }); - BuiltBuffer buffer = bufferBuilder.end(); - vertexBuffer.bind(); - vertexBuffer.upload(buffer); - VertexBuffer.unbind(); + BuiltBuffer buffer = bufferBuilder.endNullable(); + if(buffer != null) + { + vertexBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); + vertexBuffer.bind(); + vertexBuffer.upload(buffer); + VertexBuffer.unbind(); + } doneCompiling = true; } diff --git a/src/main/java/net/wurstclient/hacks/SearchHack.java b/src/main/java/net/wurstclient/hacks/SearchHack.java index 4855577b17..87a445a7c1 100644 --- a/src/main/java/net/wurstclient/hacks/SearchHack.java +++ b/src/main/java/net/wurstclient/hacks/SearchHack.java @@ -18,6 +18,7 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.block.Block; import net.minecraft.client.gl.ShaderProgram; import net.minecraft.client.gl.VertexBuffer; @@ -256,24 +257,31 @@ else if(notify) private void setBufferFromTask() { - Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator - .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); - + ArrayList vertices = compileVerticesTask.join(); RegionPos region = RenderUtils.getCameraRegion(); - for(int[] vertex : compileVerticesTask.join()) - bufferBuilder.vertex(vertex[0] - region.x(), vertex[1], - vertex[2] - region.z()); - - BuiltBuffer buffer = bufferBuilder.end(); - if(vertexBuffer != null) + { vertexBuffer.close(); + vertexBuffer = null; + } - vertexBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); - vertexBuffer.bind(); - vertexBuffer.upload(buffer); - VertexBuffer.unbind(); + if(!vertices.isEmpty()) + { + Tessellator tessellator = RenderSystem.renderThreadTesselator(); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + + for(int[] vertex : vertices) + bufferBuilder.vertex(vertex[0] - region.x(), vertex[1], + vertex[2] - region.z()); + + BuiltBuffer buffer = bufferBuilder.endNullable(); + + vertexBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); + vertexBuffer.bind(); + vertexBuffer.upload(buffer); + VertexBuffer.unbind(); + } bufferUpToDate = true; bufferRegion = region; diff --git a/src/main/java/net/wurstclient/hacks/SkinDerpHack.java b/src/main/java/net/wurstclient/hacks/SkinDerpHack.java index 618a8338fe..9a8f336688 100644 --- a/src/main/java/net/wurstclient/hacks/SkinDerpHack.java +++ b/src/main/java/net/wurstclient/hacks/SkinDerpHack.java @@ -8,6 +8,7 @@ package net.wurstclient.hacks; import java.util.Random; + import net.minecraft.entity.player.PlayerModelPart; import net.wurstclient.Category; import net.wurstclient.SearchTags; diff --git a/src/main/java/net/wurstclient/hacks/TunnellerHack.java b/src/main/java/net/wurstclient/hacks/TunnellerHack.java index 6f201fe4b2..f3e05f885e 100644 --- a/src/main/java/net/wurstclient/hacks/TunnellerHack.java +++ b/src/main/java/net/wurstclient/hacks/TunnellerHack.java @@ -16,6 +16,7 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; @@ -271,8 +272,8 @@ private void updateCyanBuffer() vertexBuffers[0] = new VertexBuffer(VertexBuffer.Usage.STATIC); Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); RegionPos region = RenderUtils.getCameraRegion(); Vec3d offset = Vec3d.ofCenter(start).subtract(region.toVec3d()); @@ -383,9 +384,10 @@ public void run() getAllInBox(from, to).forEach(blocks::add); if(vertexBuffers[1] != null) + { vertexBuffers[1].close(); - - vertexBuffers[1] = new VertexBuffer(VertexBuffer.Usage.STATIC); + vertexBuffers[1] = null; + } RegionPos region = RenderUtils.getCameraRegion(); Box box = new Box(0.1, 0.1, 0.1, 0.9, 0.9, 0.9) @@ -411,10 +413,14 @@ public void run() RenderUtils.drawOutlinedBox(box.offset(pos), bufferBuilder); } - BuiltBuffer buffer = bufferBuilder.end(); - vertexBuffers[1].bind(); - vertexBuffers[1].upload(buffer); - VertexBuffer.unbind(); + BuiltBuffer buffer = bufferBuilder.endNullable(); + if(buffer != null) + { + vertexBuffers[1] = new VertexBuffer(VertexBuffer.Usage.STATIC); + vertexBuffers[1].bind(); + vertexBuffers[1].upload(buffer); + VertexBuffer.unbind(); + } if(currentBlock == null) { @@ -493,27 +499,32 @@ public boolean canRun() blocks.add(pos); if(vertexBuffers[2] != null) + { vertexBuffers[2].close(); + vertexBuffers[2] = null; + } - vertexBuffers[2] = new VertexBuffer(VertexBuffer.Usage.STATIC); - - RegionPos region = RenderUtils.getCameraRegion(); - Box box = new Box(0.1, 0.1, 0.1, 0.9, 0.9, 0.9) - .offset(region.negate().toVec3d()); - - Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); - - for(BlockPos pos : blocks) - RenderUtils.drawOutlinedBox(box.offset(pos), bufferBuilder); - - BuiltBuffer buffer = bufferBuilder.end(); - vertexBuffers[2].bind(); - vertexBuffers[2].upload(buffer); - VertexBuffer.unbind(); + if(!blocks.isEmpty()) + { + RegionPos region = RenderUtils.getCameraRegion(); + Box box = new Box(0.1, 0.1, 0.1, 0.9, 0.9, 0.9) + .offset(region.negate().toVec3d()); + + Tessellator tessellator = RenderSystem.renderThreadTesselator(); + BufferBuilder bufferBuilder = tessellator.begin( + VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + + for(BlockPos pos : blocks) + RenderUtils.drawOutlinedBox(box.offset(pos), bufferBuilder); + + vertexBuffers[2] = new VertexBuffer(VertexBuffer.Usage.STATIC); + vertexBuffers[2].bind(); + vertexBuffers[2].upload(bufferBuilder.end()); + VertexBuffer.unbind(); + return true; + } - return !blocks.isEmpty(); + return false; } private BlockPos offsetFloor(BlockPos pos, Vec3i vec) @@ -634,26 +645,32 @@ public boolean canRun() ChatUtils.error("The tunnel is flooded, cannot continue."); if(vertexBuffers[3] != null) + { vertexBuffers[3].close(); + vertexBuffers[3] = null; + } - vertexBuffers[3] = new VertexBuffer(VertexBuffer.Usage.STATIC); - - RegionPos region = RenderUtils.getCameraRegion(); - Box box = new Box(0.1, 0.1, 0.1, 0.9, 0.9, 0.9) - .offset(region.negate().toVec3d()); - - Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); - - for(BlockPos pos : liquids) - RenderUtils.drawOutlinedBox(box.offset(pos), bufferBuilder); - - BuiltBuffer buffer = bufferBuilder.end(); + if(!liquids.isEmpty()) + { + RegionPos region = RenderUtils.getCameraRegion(); + Box box = new Box(0.1, 0.1, 0.1, 0.9, 0.9, 0.9) + .offset(region.negate().toVec3d()); + + Tessellator tessellator = RenderSystem.renderThreadTesselator(); + BufferBuilder bufferBuilder = tessellator.begin( + VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + + for(BlockPos pos : liquids) + RenderUtils.drawOutlinedBox(box.offset(pos), bufferBuilder); + + BuiltBuffer buffer = bufferBuilder.end(); + + vertexBuffers[3] = new VertexBuffer(VertexBuffer.Usage.STATIC); + vertexBuffers[3].bind(); + vertexBuffers[3].upload(buffer); + VertexBuffer.unbind(); + } - vertexBuffers[3].bind(); - vertexBuffers[3].upload(buffer); - VertexBuffer.unbind(); return true; } @@ -711,15 +728,16 @@ private class PlaceTorchTask extends Task @Override public boolean canRun() { + if(vertexBuffers[4] != null) + { + vertexBuffers[4].close(); + vertexBuffers[4] = null; + } + if(!torches.isChecked()) { lastTorch = null; nextTorch = BlockPos.ofFloored(MC.player.getPos()); - if(vertexBuffers[4] != null) - { - vertexBuffers[4].close(); - vertexBuffers[4] = null; - } return false; } @@ -730,15 +748,11 @@ public boolean canRun() nextTorch = lastTorch.offset(direction, size.getSelected().torchDistance); - if(vertexBuffers[4] != null) - vertexBuffers[4].close(); - - vertexBuffers[4] = new VertexBuffer(VertexBuffer.Usage.STATIC); - RegionPos region = RenderUtils.getCameraRegion(); Vec3d torchVec = Vec3d.ofBottomCenter(nextTorch).subtract(region.toVec3d()); + vertexBuffers[4] = new VertexBuffer(VertexBuffer.Usage.STATIC); RenderUtils.drawArrow(torchVec, torchVec.add(0, 0.5, 0), vertexBuffers[4]); diff --git a/src/main/java/net/wurstclient/hacks/autofarm/AutoFarmRenderer.java b/src/main/java/net/wurstclient/hacks/autofarm/AutoFarmRenderer.java index 298f392e6c..22a2594609 100644 --- a/src/main/java/net/wurstclient/hacks/autofarm/AutoFarmRenderer.java +++ b/src/main/java/net/wurstclient/hacks/autofarm/AutoFarmRenderer.java @@ -16,6 +16,7 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.client.gl.ShaderProgram; import net.minecraft.client.gl.VertexBuffer; import net.minecraft.client.render.BufferBuilder; @@ -112,11 +113,17 @@ private void updateGreenBuffer(List blocksToHarvest, Tessellator tessellator, Box box, Vec3d regionOffset) { if(greenBuffer != null) + { greenBuffer.close(); + greenBuffer = null; + } + + if(blocksToHarvest.isEmpty()) + return; greenBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); for(BlockPos pos : blocksToHarvest) { @@ -134,11 +141,17 @@ private void updateCyanBuffer(Set plants, Tessellator tessellator, Box node, Vec3d regionOffset) { if(cyanBuffer != null) + { cyanBuffer.close(); + cyanBuffer = null; + } + + if(plants.isEmpty()) + return; cyanBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); for(BlockPos pos : plants) { @@ -156,11 +169,17 @@ private void updateRedBuffer(List blocksToReplant, Tessellator tessellator, Box box, Vec3d regionOffset) { if(redBuffer != null) + { redBuffer.close(); + redBuffer = null; + } + + if(blocksToReplant.isEmpty()) + return; redBuffer = new VertexBuffer(VertexBuffer.Usage.STATIC); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); for(BlockPos pos : blocksToReplant) { diff --git a/src/main/java/net/wurstclient/hacks/autofish/AutoFishDebugDraw.java b/src/main/java/net/wurstclient/hacks/autofish/AutoFishDebugDraw.java index 079119bc59..820e098cba 100644 --- a/src/main/java/net/wurstclient/hacks/autofish/AutoFishDebugDraw.java +++ b/src/main/java/net/wurstclient/hacks/autofish/AutoFishDebugDraw.java @@ -141,8 +141,8 @@ private void drawLastBite(MatrixStack matrixStack, RegionPos region) float[] colorF = ddColor.getColorF(); RenderSystem.setShaderColor(colorF[0], colorF[1], colorF[2], 0.5F); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, -0.125F, 0, -0.125F); bufferBuilder.vertex(matrix, 0.125F, 0, 0.125F); bufferBuilder.vertex(matrix, 0.125F, 0, -0.125F); diff --git a/src/main/java/net/wurstclient/hacks/autolibrarian/BookOffer.java b/src/main/java/net/wurstclient/hacks/autolibrarian/BookOffer.java index 095c067f46..e0b6214508 100644 --- a/src/main/java/net/wurstclient/hacks/autolibrarian/BookOffer.java +++ b/src/main/java/net/wurstclient/hacks/autolibrarian/BookOffer.java @@ -102,7 +102,7 @@ public boolean isFullyValid() */ public boolean isMostlyValid() { - return Identifier.isValid(id) && level >= 1 && price >= 1 + return Identifier.tryParse(id) != null && level >= 1 && price >= 1 && price <= 64; } diff --git a/src/main/java/net/wurstclient/hacks/chestesp/ChestEspRenderer.java b/src/main/java/net/wurstclient/hacks/chestesp/ChestEspRenderer.java index 0c659216c9..e49263dad0 100644 --- a/src/main/java/net/wurstclient/hacks/chestesp/ChestEspRenderer.java +++ b/src/main/java/net/wurstclient/hacks/chestesp/ChestEspRenderer.java @@ -86,8 +86,8 @@ public void renderLines(ChestEspGroup group) float[] colorF = group.getColorF(); RenderSystem.setShaderColor(colorF[0], colorF[1], colorF[2], 0.5F); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); for(Box box : group.getBoxes()) { diff --git a/src/main/java/net/wurstclient/hacks/newchunks/NewChunksChunkRenderer.java b/src/main/java/net/wurstclient/hacks/newchunks/NewChunksChunkRenderer.java index bc40c0ace4..880d5c2234 100644 --- a/src/main/java/net/wurstclient/hacks/newchunks/NewChunksChunkRenderer.java +++ b/src/main/java/net/wurstclient/hacks/newchunks/NewChunksChunkRenderer.java @@ -8,6 +8,7 @@ package net.wurstclient.hacks.newchunks; import java.util.Set; + import net.minecraft.client.render.BuiltBuffer; import net.minecraft.util.math.ChunkPos; diff --git a/src/main/java/net/wurstclient/hacks/newchunks/NewChunksOutlineRenderer.java b/src/main/java/net/wurstclient/hacks/newchunks/NewChunksOutlineRenderer.java index b1dab13eab..54a3533bbf 100644 --- a/src/main/java/net/wurstclient/hacks/newchunks/NewChunksOutlineRenderer.java +++ b/src/main/java/net/wurstclient/hacks/newchunks/NewChunksOutlineRenderer.java @@ -12,6 +12,7 @@ import java.util.Set; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.BuiltBuffer; import net.minecraft.client.render.Tessellator; @@ -28,8 +29,8 @@ public final class NewChunksOutlineRenderer implements NewChunksChunkRenderer public BuiltBuffer buildBuffer(Set chunks, int drawDistance) { Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); renderChunks(new ArrayList<>(chunks), drawDistance, bufferBuilder); return bufferBuilder.end(); } diff --git a/src/main/java/net/wurstclient/hacks/newchunks/NewChunksReasonsRenderer.java b/src/main/java/net/wurstclient/hacks/newchunks/NewChunksReasonsRenderer.java index 40f26d76fd..beaa167403 100644 --- a/src/main/java/net/wurstclient/hacks/newchunks/NewChunksReasonsRenderer.java +++ b/src/main/java/net/wurstclient/hacks/newchunks/NewChunksReasonsRenderer.java @@ -12,6 +12,7 @@ import java.util.Set; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.BuiltBuffer; import net.minecraft.client.render.Tessellator; diff --git a/src/main/java/net/wurstclient/hacks/newchunks/NewChunksRenderer.java b/src/main/java/net/wurstclient/hacks/newchunks/NewChunksRenderer.java index 2f7a09d58e..3e5ea82816 100644 --- a/src/main/java/net/wurstclient/hacks/newchunks/NewChunksRenderer.java +++ b/src/main/java/net/wurstclient/hacks/newchunks/NewChunksRenderer.java @@ -11,6 +11,7 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.client.gl.ShaderProgram; import net.minecraft.client.gl.VertexBuffer; import net.minecraft.client.render.BuiltBuffer; @@ -40,6 +41,12 @@ public NewChunksRenderer(SliderSetting altitude, SliderSetting opacity, public void updateBuffer(int i, BuiltBuffer buffer) { + if(buffer == null) + { + vertexBuffers[i] = null; + return; + } + vertexBuffers[i] = new VertexBuffer(VertexBuffer.Usage.STATIC); vertexBuffers[i].bind(); vertexBuffers[i].upload(buffer); diff --git a/src/main/java/net/wurstclient/hacks/newchunks/NewChunksSquareRenderer.java b/src/main/java/net/wurstclient/hacks/newchunks/NewChunksSquareRenderer.java index 87083e5b7d..1e531af9b5 100644 --- a/src/main/java/net/wurstclient/hacks/newchunks/NewChunksSquareRenderer.java +++ b/src/main/java/net/wurstclient/hacks/newchunks/NewChunksSquareRenderer.java @@ -12,6 +12,7 @@ import java.util.Set; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.BuiltBuffer; import net.minecraft.client.render.Tessellator; @@ -31,7 +32,7 @@ public BuiltBuffer buildBuffer(Set chunks, int drawDistance) BufferBuilder bufferBuilder = tessellator .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); renderChunks(new ArrayList<>(chunks), drawDistance, bufferBuilder); - return bufferBuilder.end(); + return bufferBuilder.endNullable(); } private void renderChunks(List chunks, int drawDistance, diff --git a/src/main/java/net/wurstclient/hacks/portalesp/PortalEspRenderer.java b/src/main/java/net/wurstclient/hacks/portalesp/PortalEspRenderer.java index d579d9be75..e56b08db28 100644 --- a/src/main/java/net/wurstclient/hacks/portalesp/PortalEspRenderer.java +++ b/src/main/java/net/wurstclient/hacks/portalesp/PortalEspRenderer.java @@ -86,8 +86,8 @@ public void renderLines(PortalEspBlockGroup group) float[] colorF = group.getColorF(); RenderSystem.setShaderColor(colorF[0], colorF[1], colorF[2], 0.5F); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); for(Box box : group.getBoxes()) { diff --git a/src/main/java/net/wurstclient/hacks/treebot/Tree.java b/src/main/java/net/wurstclient/hacks/treebot/Tree.java index e9b6b88ec8..7b0202ed86 100644 --- a/src/main/java/net/wurstclient/hacks/treebot/Tree.java +++ b/src/main/java/net/wurstclient/hacks/treebot/Tree.java @@ -13,6 +13,7 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.client.gl.ShaderProgram; import net.minecraft.client.gl.VertexBuffer; import net.minecraft.client.render.BufferBuilder; @@ -54,8 +55,8 @@ public void compileBuffer() .offset(regionOffset); Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); RenderUtils.drawCrossBox(box.offset(stump), bufferBuilder); diff --git a/src/main/java/net/wurstclient/hud/WurstLogo.java b/src/main/java/net/wurstclient/hud/WurstLogo.java index 1246d02422..29889940ce 100644 --- a/src/main/java/net/wurstclient/hud/WurstLogo.java +++ b/src/main/java/net/wurstclient/hud/WurstLogo.java @@ -82,8 +82,8 @@ private void drawQuads(MatrixStack matrices, int x1, int y1, int x2, int y2, RenderSystem.setShader(GameRenderer::getPositionColorProgram); Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR); bufferBuilder.vertex(matrix, x1, y2, 0.0F).color(r, g, b, a); bufferBuilder.vertex(matrix, x2, y2, 0.0F).color(r, g, b, a); bufferBuilder.vertex(matrix, x2, y1, 0.0F).color(r, g, b, a); diff --git a/src/main/java/net/wurstclient/mixin/BackgroundRendererMixin.java b/src/main/java/net/wurstclient/mixin/BackgroundRendererMixin.java index 5e00da47f3..552fcd1abb 100644 --- a/src/main/java/net/wurstclient/mixin/BackgroundRendererMixin.java +++ b/src/main/java/net/wurstclient/mixin/BackgroundRendererMixin.java @@ -14,6 +14,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.block.enums.CameraSubmersionType; import net.minecraft.client.render.BackgroundRenderer; import net.minecraft.client.render.BackgroundRenderer.StatusEffectFogModifier; diff --git a/src/main/java/net/wurstclient/mixin/CameraMixin.java b/src/main/java/net/wurstclient/mixin/CameraMixin.java index 880675f9bb..f82efa7a79 100644 --- a/src/main/java/net/wurstclient/mixin/CameraMixin.java +++ b/src/main/java/net/wurstclient/mixin/CameraMixin.java @@ -12,6 +12,7 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.ModifyVariable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + import net.minecraft.block.enums.CameraSubmersionType; import net.minecraft.client.render.Camera; import net.wurstclient.WurstClient; @@ -42,7 +43,7 @@ private void onClipToSpace(float desiredCameraDistance, } @Inject(at = @At("HEAD"), - method = "getSubmersionType()Lnet/minecraft/client/render/CameraSubmersionType;", + method = "getSubmersionType()Lnet/minecraft/block/enums/CameraSubmersionType;", cancellable = true) private void onGetSubmersionType( CallbackInfoReturnable cir) diff --git a/src/main/java/net/wurstclient/mixin/DisconnectedScreenMixin.java b/src/main/java/net/wurstclient/mixin/DisconnectedScreenMixin.java index 229bf6ca90..c166585cdf 100644 --- a/src/main/java/net/wurstclient/mixin/DisconnectedScreenMixin.java +++ b/src/main/java/net/wurstclient/mixin/DisconnectedScreenMixin.java @@ -15,6 +15,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + import net.minecraft.client.gui.screen.DisconnectedScreen; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.widget.ButtonWidget; @@ -35,7 +36,7 @@ public class DisconnectedScreenMixin extends Screen @Shadow @Final - private DisconnectionInfo field_52131;// reason container thing + private DisconnectionInfo info; @Shadow @Final private Screen parent; @@ -54,7 +55,7 @@ private void onInit(CallbackInfo ci) if(!WurstClient.INSTANCE.isEnabled()) return; - Text reason = field_52131.reason(); + Text reason = info.reason(); System.out.println("Disconnected: " + reason); if(ForcedChatReportsScreen.isCausedByNoChatReports(reason)) diff --git a/src/main/java/net/wurstclient/navigator/NavigatorFeatureScreen.java b/src/main/java/net/wurstclient/navigator/NavigatorFeatureScreen.java index d4abb4f69b..418f62d219 100644 --- a/src/main/java/net/wurstclient/navigator/NavigatorFeatureScreen.java +++ b/src/main/java/net/wurstclient/navigator/NavigatorFeatureScreen.java @@ -380,8 +380,8 @@ protected void onRender(DrawContext context, int mouseX, int mouseY, // window background // left & right setColorToBackground(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); bufferBuilder.vertex(matrix, x1, y3, 0); bufferBuilder.vertex(matrix, x1, y2, 0); bufferBuilder.vertex(matrix, x3, y2, 0); @@ -393,8 +393,8 @@ protected void onRender(DrawContext context, int mouseX, int mouseY, BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); setColorToBackground(); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, + VertexFormats.POSITION); // window background // between children diff --git a/src/main/java/net/wurstclient/navigator/NavigatorMainScreen.java b/src/main/java/net/wurstclient/navigator/NavigatorMainScreen.java index b91c62b123..d60232f1d1 100644 --- a/src/main/java/net/wurstclient/navigator/NavigatorMainScreen.java +++ b/src/main/java/net/wurstclient/navigator/NavigatorMainScreen.java @@ -303,8 +303,8 @@ protected void onRender(DrawContext context, int mouseX, int mouseY, // background RenderSystem.setShaderColor(bgColor[0], bgColor[1], bgColor[2], 0.75F); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); bufferBuilder.vertex(matrix, xt1, yt1, 0); bufferBuilder.vertex(matrix, xt1, yt2, 0); bufferBuilder.vertex(matrix, xt2, yt2, 0); @@ -428,8 +428,8 @@ else if(clickTimer == 0) int by2 = by1 + area.height - 4; float[] acColor = WurstClient.INSTANCE.getGui().getAcColor(); RenderSystem.setShaderColor(acColor[0], acColor[1], acColor[2], 0.5F); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, bx1, by1, 0); bufferBuilder.vertex(matrix, bx1, by2, 0); BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); @@ -449,8 +449,8 @@ else if(clickTimer == 0) // arrow RenderSystem.setShaderColor(0, hovering ? 1 : 0.85F, 0, 1); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.TRIANGLES, + VertexFormats.POSITION); bufferBuilder.vertex(matrix, ax1, ay1, 0); bufferBuilder.vertex(matrix, ax2, ay1, 0); bufferBuilder.vertex(matrix, ax3, ay2, 0); diff --git a/src/main/java/net/wurstclient/navigator/NavigatorScreen.java b/src/main/java/net/wurstclient/navigator/NavigatorScreen.java index b5d859106a..1f4351dc7f 100644 --- a/src/main/java/net/wurstclient/navigator/NavigatorScreen.java +++ b/src/main/java/net/wurstclient/navigator/NavigatorScreen.java @@ -341,8 +341,8 @@ protected final void drawDownShadow(MatrixStack matrixStack, int x1, int y1, // outline float yi1 = y1 + 0.1F; RenderSystem.setShaderColor(acColor[0], acColor[1], acColor[2], 0.5F); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, x1, yi1, 0); bufferBuilder.vertex(matrix, x2, yi1, 0); BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); diff --git a/src/main/java/net/wurstclient/util/ListWidget.java b/src/main/java/net/wurstclient/util/ListWidget.java index 289b69a0cf..a6b43229ae 100644 --- a/src/main/java/net/wurstclient/util/ListWidget.java +++ b/src/main/java/net/wurstclient/util/ListWidget.java @@ -187,9 +187,8 @@ public void render(DrawContext context, int mouseX, int mouseY, float delta) GlStateManager.DstFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SrcFactor.ZERO, GlStateManager.DstFactor.ONE); RenderSystem.setShaderColor(1, 1, 1, 1); - bufferBuilder = - tessellator.begin(VertexFormat.DrawMode.QUADS, - VertexFormats.POSITION_TEXTURE_COLOR); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, + VertexFormats.POSITION_TEXTURE_COLOR); bufferBuilder.vertex(left, top + 4, 0).texture(0, 1).color(0, 0, 0, 0); bufferBuilder.vertex(right, top + 4, 0).texture(1, 1).color(0, 0, 0, @@ -199,9 +198,8 @@ public void render(DrawContext context, int mouseX, int mouseY, float delta) bufferBuilder.vertex(left, top, 0).texture(0, 0).color(0, 0, 0, 255); BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); - bufferBuilder = - tessellator.begin(VertexFormat.DrawMode.QUADS, - VertexFormats.POSITION_TEXTURE_COLOR); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, + VertexFormats.POSITION_TEXTURE_COLOR); bufferBuilder.vertex(left, bottom, 0).texture(0, 1).color(0, 0, 0, 255); bufferBuilder.vertex(right, bottom, 0).texture(1, 1).color(0, 0, 0, @@ -222,31 +220,28 @@ public void render(DrawContext context, int mouseX, int mouseY, float delta) p = top; RenderSystem.setShader(GameRenderer::getPositionColorProgram); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, + VertexFormats.POSITION_COLOR); bufferBuilder.vertex(i, bottom, 0).color(0, 0, 0, 255); bufferBuilder.vertex(j, bottom, 0).color(0, 0, 0, 255); bufferBuilder.vertex(j, top, 0).color(0, 0, 0, 255); bufferBuilder.vertex(i, top, 0).color(0, 0, 0, 255); - BufferRenderer - .drawWithGlobalProgram(bufferBuilder.end()); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, + VertexFormats.POSITION_COLOR); bufferBuilder.vertex(i, p + o, 0).color(128, 128, 128, 255); bufferBuilder.vertex(j, p + o, 0).color(128, 128, 128, 255); bufferBuilder.vertex(j, p, 0).color(128, 128, 128, 255); bufferBuilder.vertex(i, p, 0).color(128, 128, 128, 255); - BufferRenderer - .drawWithGlobalProgram(bufferBuilder.end()); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, + VertexFormats.POSITION_COLOR); bufferBuilder.vertex(i, p + o - 1, 0).color(192, 192, 192, 255); bufferBuilder.vertex(j - 1, p + o - 1, 0).color(192, 192, 192, 255); bufferBuilder.vertex(j - 1, p, 0).color(192, 192, 192, 255); bufferBuilder.vertex(i, p, 0).color(192, 192, 192, 255); - BufferRenderer - .drawWithGlobalProgram(bufferBuilder.end()); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); } renderDecorations(mouseX, mouseY); @@ -394,23 +389,21 @@ protected void renderList(DrawContext context, int i, int j, int k, int l, int r = left + width / 2 + getRowWidth() / 2; float g = isFocused() ? 1 : 0.5F; RenderSystem.setShaderColor(g, g, g, 1); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); bufferBuilder.vertex(q, o + p + 2, 0); bufferBuilder.vertex(r, o + p + 2, 0); bufferBuilder.vertex(r, o - 2, 0); bufferBuilder.vertex(q, o - 2, 0); - BufferRenderer - .drawWithGlobalProgram(bufferBuilder.end()); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); RenderSystem.setShaderColor(0, 0, 0, 1); - bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.QUADS, VertexFormats.POSITION); + bufferBuilder = tessellator.begin(VertexFormat.DrawMode.QUADS, + VertexFormats.POSITION); bufferBuilder.vertex(q + 1, o + p + 1, 0); bufferBuilder.vertex(r - 1, o + p + 1, 0); bufferBuilder.vertex(r - 1, o - 1, 0); bufferBuilder.vertex(q + 1, o - 1, 0); - BufferRenderer - .drawWithGlobalProgram(bufferBuilder.end()); + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); } RenderSystem.setShaderColor(1, 1, 1, 1); diff --git a/src/main/java/net/wurstclient/util/RenderUtils.java b/src/main/java/net/wurstclient/util/RenderUtils.java index 48b5874cf2..4c36c4eaa6 100644 --- a/src/main/java/net/wurstclient/util/RenderUtils.java +++ b/src/main/java/net/wurstclient/util/RenderUtils.java @@ -12,6 +12,7 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.systems.RenderSystem; + import net.minecraft.block.Blocks; import net.minecraft.client.font.TextRenderer; import net.minecraft.client.gl.VertexBuffer; @@ -232,8 +233,8 @@ public static void drawOutlinedBox(Box bb, MatrixStack matrixStack) Matrix4f matrix = matrixStack.peek().getPositionMatrix(); Tessellator tessellator = RenderSystem.renderThreadTesselator(); RenderSystem.setShader(GameRenderer::getPositionProgram); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); float minX = (float)bb.minX; float minY = (float)bb.minY; @@ -284,8 +285,8 @@ public static void drawOutlinedBox(Box bb, MatrixStack matrixStack) public static void drawOutlinedBox(Box bb, VertexBuffer vertexBuffer) { Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); drawOutlinedBox(bb, bufferBuilder); BuiltBuffer buffer = bufferBuilder.end(); @@ -351,8 +352,8 @@ public static void drawCrossBox(Box bb, MatrixStack matrixStack) Matrix4f matrix = matrixStack.peek().getPositionMatrix(); Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, minX, minY, minZ); bufferBuilder.vertex(matrix, maxX, maxY, minZ); @@ -396,8 +397,8 @@ public static void drawCrossBox(Box bb, MatrixStack matrixStack) public static void drawCrossBox(Box bb, VertexBuffer vertexBuffer) { Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); drawCrossBox(bb, bufferBuilder); BuiltBuffer buffer = bufferBuilder.end(); @@ -462,8 +463,8 @@ public static void drawNode(Box bb, MatrixStack matrixStack) double midY = (bb.minY + bb.maxY) / 2; double midZ = (bb.minZ + bb.maxZ) / 2; - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); bufferBuilder.vertex(matrix, (float)midX, (float)midY, (float)bb.maxZ); bufferBuilder.vertex(matrix, (float)bb.minX, (float)midY, (float)midZ); @@ -507,8 +508,8 @@ public static void drawNode(Box bb, MatrixStack matrixStack) public static void drawNode(Box bb, VertexBuffer vertexBuffer) { Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); drawNode(bb, bufferBuilder); BuiltBuffer buffer = bufferBuilder.end(); @@ -571,8 +572,8 @@ public static void drawArrow(Vec3d from, Vec3d to, MatrixStack matrixStack) RenderSystem.setShader(GameRenderer::getPositionProgram); Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); double startX = from.x; double startY = from.y; @@ -642,8 +643,8 @@ public static void drawArrow(Vec3d from, Vec3d to, VertexBuffer vertexBuffer) { Tessellator tessellator = RenderSystem.renderThreadTesselator(); - BufferBuilder bufferBuilder = tessellator.begin( - VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); + BufferBuilder bufferBuilder = tessellator + .begin(VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION); drawArrow(from, to, bufferBuilder); BuiltBuffer buffer = bufferBuilder.end(); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 66dac03e74..61729aab29 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -29,9 +29,9 @@ "accessWidener" : "wurst.accesswidener", "depends": { - "fabricloader": ">=0.15.9", - "fabric-api": ">=0.99.1", - "minecraft": "~1.21-alpha.24.21.a", + "fabricloader": ">=0.15.10", + "fabric-api": ">=0.99.2", + "minecraft": "~1.21-beta.1", "java": ">=21" }, "suggests": {