From d249318b808d17912cd1ecd11b22d6365e3e49a4 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 11 Apr 2021 02:56:11 +0200 Subject: [PATCH] Pose stack says no - TileEntities not appreciative of wrapped worlds are now much less likely to cause a hard crash --- .../render/TileEntityRenderHelper.java | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/render/TileEntityRenderHelper.java b/src/main/java/com/simibubi/create/foundation/render/TileEntityRenderHelper.java index 2e22b22e4..efbf65cff 100644 --- a/src/main/java/com/simibubi/create/foundation/render/TileEntityRenderHelper.java +++ b/src/main/java/com/simibubi/create/foundation/render/TileEntityRenderHelper.java @@ -54,19 +54,17 @@ public class TileEntityRenderHelper { continue; } - try { - BlockPos pos = tileEntity.getPos(); - ms.push(); - MatrixStacker.of(ms) - .translate(pos); + BlockPos pos = tileEntity.getPos(); + ms.push(); + MatrixStacker.of(ms) + .translate(pos); + try { Vector4f vec = new Vector4f(pos.getX() + .5f, pos.getY() + .5f, pos.getZ() + .5f, 1); vec.transform(matrix); BlockPos lightPos = new BlockPos(vec.getX(), vec.getY(), vec.getZ()); int worldLight = ContraptionRenderDispatcher.getLightOnContraption(world, renderWorld, pos, lightPos); - renderer.render(tileEntity, pt, ms, buffer, worldLight, OverlayTexture.DEFAULT_UV); - ms.pop(); } catch (Exception e) { iterator.remove(); @@ -74,14 +72,13 @@ public class TileEntityRenderHelper { String message = "TileEntity " + tileEntity.getType() .getRegistryName() .toString() + " didn't want to render while moved.\n"; - if (AllConfigs.CLIENT.explainRenderErrors.get()) { + if (AllConfigs.CLIENT.explainRenderErrors.get()) Create.logger.error(message, e); - continue; - } - - Create.logger.error(message); - continue; + else + Create.logger.error(message); } + + ms.pop(); } }