From a0a2ce5c99089c0995209fcc70935b0e14a8b78e Mon Sep 17 00:00:00 2001 From: AutumnVN Date: Fri, 30 Jun 2023 11:07:20 +0700 Subject: [PATCH] --- src/main/java/autumnvn/loli/mixin/EntityRendererMixin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/autumnvn/loli/mixin/EntityRendererMixin.java b/src/main/java/autumnvn/loli/mixin/EntityRendererMixin.java index 540ce6a..300270a 100644 --- a/src/main/java/autumnvn/loli/mixin/EntityRendererMixin.java +++ b/src/main/java/autumnvn/loli/mixin/EntityRendererMixin.java @@ -15,6 +15,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.attribute.EntityAttributes; +import net.minecraft.entity.decoration.ArmorStandEntity; import net.minecraft.entity.passive.HorseEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.text.Text; @@ -32,7 +33,7 @@ protected void renderLabelIfPresent(T entity, Text text, MatrixStack matrices, @Inject(method = "render", at = @At("HEAD"), cancellable = true) private void onRender(T entity, float yaw, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) { - if (entity instanceof LivingEntity) { + if (entity instanceof LivingEntity && !(entity instanceof ArmorStandEntity)) { String entityName = entity.getName().getString(); int health = (int) Math.ceil(getHealth(entity)); entityName += " " + getHealthColor(health) + health + Formatting.RED + "❤";