From 774f1b5f5609a29b3913e4349a5793f3c5e11927 Mon Sep 17 00:00:00 2001 From: Snownee <1850986885@qq.com> Date: Sat, 9 May 2020 01:05:01 +0800 Subject: [PATCH] Fix broken rendering state --- .../components/contraptions/ChassisRangeDisplay.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java index fa722b8a3..52e132459 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java @@ -15,7 +15,6 @@ import com.mojang.blaze3d.platform.GlStateManager.SourceFactor; import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllItems; import com.simibubi.create.AllKeys; -import com.simibubi.create.foundation.utility.TessellatorHelper; import com.simibubi.create.foundation.utility.outliner.BlockClusterOutline; import com.simibubi.create.foundation.utility.outliner.Outline; import com.simibubi.create.foundation.utility.outliner.OutlineParticle; @@ -196,8 +195,11 @@ public class ChassisRangeDisplay { public static void renderOutlines(float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer) { // TODO 1.15 buffered render + if (entries.isEmpty() && groupEntries.isEmpty()) { + return; + } RenderSystem.lineWidth(2); - TessellatorHelper.prepareForDrawing(); + //TessellatorHelper.prepareForDrawing(); RenderSystem.disableTexture(); RenderSystem.enableAlphaTest(); @@ -208,7 +210,7 @@ public class ChassisRangeDisplay { RenderSystem.enableTexture(); RenderSystem.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA); - TessellatorHelper.cleanUpAfterDrawing(); + //TessellatorHelper.cleanUpAfterDrawing(); RenderSystem.lineWidth(1); }