From 876757f80a2e7a27a649aab283a4124bc0ef70eb Mon Sep 17 00:00:00 2001 From: Uraneptus Date: Wed, 23 Oct 2024 19:52:04 +0200 Subject: [PATCH] fix pmd rule violations --- .../vazkii/neat/mixin/EntityRendererMixin.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Xplat/src/main/java/vazkii/neat/mixin/EntityRendererMixin.java b/Xplat/src/main/java/vazkii/neat/mixin/EntityRendererMixin.java index 5659ecb..3ff548b 100644 --- a/Xplat/src/main/java/vazkii/neat/mixin/EntityRendererMixin.java +++ b/Xplat/src/main/java/vazkii/neat/mixin/EntityRendererMixin.java @@ -30,16 +30,21 @@ private void neat_disableNameTag(Entity entity, float $$1, float $$2, PoseStack @Unique public boolean neat$allowNameTagDisable(Entity entity) { - if (!(entity instanceof LivingEntity)) + if (!(entity instanceof LivingEntity)) { return false; - if (entity instanceof Player && !NeatConfig.instance.showOnPlayers()) + } + if (entity instanceof Player && !NeatConfig.instance.showOnPlayers()) { return false; - if (HealthBarRenderer.isBoss(entity) && !NeatConfig.instance.showOnBosses()) + } + if (HealthBarRenderer.isBoss(entity) && !NeatConfig.instance.showOnBosses()) { return false; - if (entity.getType().getCategory().isFriendly() && !NeatConfig.instance.showOnPassive()) + } + if (entity.getType().getCategory().isFriendly() && !NeatConfig.instance.showOnPassive()) { return false; - if ((!entity.getType().getCategory().isFriendly() && !HealthBarRenderer.isBoss(entity)) && !NeatConfig.instance.showOnHostile()) + } + if ((!entity.getType().getCategory().isFriendly() && !HealthBarRenderer.isBoss(entity)) && !NeatConfig.instance.showOnHostile()) { return false; + } var id = BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()); return !NeatConfig.instance.blacklist().contains(id.toString()) && NeatConfig.draw; }