From eed1b419265a4a882f77fb590da4320d84be3c8c Mon Sep 17 00:00:00 2001 From: FirstMegaGame4 <84094287+FirstMegaGame4@users.noreply.github.com> Date: Wed, 12 Jun 2024 02:08:50 +0200 Subject: [PATCH] thanks ShiroJR --- .../entity/renderer/FestiveBallEntityRenderer.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/mmodding/extravaganza/client/entity/renderer/FestiveBallEntityRenderer.java b/src/main/java/com/mmodding/extravaganza/client/entity/renderer/FestiveBallEntityRenderer.java index 6bb79088..3f65affc 100644 --- a/src/main/java/com/mmodding/extravaganza/client/entity/renderer/FestiveBallEntityRenderer.java +++ b/src/main/java/com/mmodding/extravaganza/client/entity/renderer/FestiveBallEntityRenderer.java @@ -27,10 +27,12 @@ public Identifier getTexture(FestiveBallEntity entity) { @Override public void render(FestiveBallEntity entity, float yaw, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light) { - matrices.push(); - matrices.translate(0.0f, -1.1f, 0.0f); - matrices.scale(0.8f, 0.8f, 0.8f); - this.model.render(matrices, vertexConsumers.getBuffer(this.model.getLayer(this.getTexture(entity))), light, OverlayTexture.DEFAULT_UV, 654311423); - matrices.pop(); + if (entity.age >= 2 || !(this.dispatcher.camera.getFocusedEntity().squaredDistanceTo(entity) < 12.25)) { + matrices.push(); + matrices.translate(0.0f, -1.1f, 0.0f); + matrices.scale(0.8f, 0.8f, 0.8f); + this.model.render(matrices, vertexConsumers.getBuffer(this.model.getLayer(this.getTexture(entity))), light, OverlayTexture.DEFAULT_UV, 654311423); + matrices.pop(); + } } }