From e1a4c9ec43431bb92b55ac89117a752eb28480f5 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Mon, 11 Jul 2022 21:40:53 +0200 Subject: [PATCH] Cull me away - Move carriage visibility guards out of shouldRender to avoid being denied entity ticks when entityculling is installed --- .../logistics/trains/entity/CarriageContraptionEntity.java | 5 ----- .../trains/entity/CarriageContraptionEntityRenderer.java | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java b/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java index 38a484a04..b4e0a7fea 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java @@ -736,11 +736,6 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity { dimensional.updateRenderedCutoff(); } - @Override - public boolean isReadyForRender() { - return super.isReadyForRender() && validForRender && !firstPositionUpdate; - } - @OnlyIn(Dist.CLIENT) private WeakReference instanceHolder; diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntityRenderer.java b/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntityRenderer.java index 9a206acbf..5de635e4a 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntityRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntityRenderer.java @@ -35,6 +35,9 @@ public class CarriageContraptionEntityRenderer extends ContraptionEntityRenderer @Override public void render(CarriageContraptionEntity entity, float yaw, float partialTicks, PoseStack ms, MultiBufferSource buffers, int overlay) { + if (!entity.validForRender || entity.firstPositionUpdate) + return; + super.render(entity, yaw, partialTicks, ms, buffers, overlay); Carriage carriage = entity.getCarriage();