From a7c1ae3ec539a2a36308de79d3b4e730ae248da6 Mon Sep 17 00:00:00 2001 From: tterrag Date: Sat, 4 Apr 2020 22:08:57 -0400 Subject: [PATCH] Fix crash in JEI rendering -- still far from functional --- .../simibubi/create/foundation/gui/ScreenElementRenderer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/foundation/gui/ScreenElementRenderer.java b/src/main/java/com/simibubi/create/foundation/gui/ScreenElementRenderer.java index 059fee889..374cd726e 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/ScreenElementRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/gui/ScreenElementRenderer.java @@ -12,6 +12,7 @@ import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.foundation.utility.ColorHelper; import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; import net.minecraft.block.FireBlock; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.BlockRendererDispatcher; @@ -74,7 +75,7 @@ public class ScreenElementRenderer { Minecraft mc = Minecraft.getInstance(); BlockRendererDispatcher blockRenderer = mc.getBlockRendererDispatcher(); IBakedModel modelToRender = null; - BlockState blockToRender = null; + BlockState blockToRender = Blocks.AIR.getDefaultState(); boolean stateMode = transformsAndModel == null; boolean fire = false;