Cull me away

- Move carriage visibility guards out of shouldRender to avoid being denied entity ticks when entityculling is installed
This commit is contained in:
simibubi 2022-07-11 21:40:53 +02:00
parent 3153ad2100
commit e1a4c9ec43
2 changed files with 3 additions and 5 deletions

View file

@ -736,11 +736,6 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity {
dimensional.updateRenderedCutoff(); dimensional.updateRenderedCutoff();
} }
@Override
public boolean isReadyForRender() {
return super.isReadyForRender() && validForRender && !firstPositionUpdate;
}
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
private WeakReference<CarriageContraptionInstance> instanceHolder; private WeakReference<CarriageContraptionInstance> instanceHolder;

View file

@ -35,6 +35,9 @@ public class CarriageContraptionEntityRenderer extends ContraptionEntityRenderer
@Override @Override
public void render(CarriageContraptionEntity entity, float yaw, float partialTicks, PoseStack ms, public void render(CarriageContraptionEntity entity, float yaw, float partialTicks, PoseStack ms,
MultiBufferSource buffers, int overlay) { MultiBufferSource buffers, int overlay) {
if (!entity.validForRender || entity.firstPositionUpdate)
return;
super.render(entity, yaw, partialTicks, ms, buffers, overlay); super.render(entity, yaw, partialTicks, ms, buffers, overlay);
Carriage carriage = entity.getCarriage(); Carriage carriage = entity.getCarriage();