Fixed model visibility not updating for mobs

This commit is contained in:
Sollace 2023-10-05 20:21:50 +01:00
parent 4904c78e01
commit 3322e7eaff
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -66,6 +66,9 @@ public abstract class AbstractPonyRenderer<T extends MobEntity, M extends Entity
@Override @Override
public void render(T entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) { public void render(T entity, float entityYaw, float tickDelta, MatrixStack stack, VertexConsumerProvider renderContext, int lightUv) {
manager.preRender(entity, ModelAttributes.Mode.THIRD_PERSON); manager.preRender(entity, ModelAttributes.Mode.THIRD_PERSON);
if (manager.getModels().body() instanceof BipedEntityModel model) {
model.setVisible(true);
}
super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv); super.render(entity, entityYaw, tickDelta, stack, renderContext, lightUv);
DebugBoundingBoxRenderer.render(getEntityPony(entity), this, entity, stack, renderContext, tickDelta); DebugBoundingBoxRenderer.render(getEntityPony(entity), this, entity, stack, renderContext, tickDelta);
} }