mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-19 16:32:31 +01:00
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:
parent
3153ad2100
commit
e1a4c9ec43
2 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue