Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
AutumnVN committed Jun 30, 2023
1 parent a3031eb commit a0a2ce5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/autumnvn/loli/mixin/EntityRendererMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 + "❤";
Expand Down

0 comments on commit a0a2ce5

Please sign in to comment.