Skip to content

Commit

Permalink
fix pmd rule violations
Browse files Browse the repository at this point in the history
  • Loading branch information
Uraneptus committed Oct 23, 2024
1 parent 0974328 commit 876757f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Xplat/src/main/java/vazkii/neat/mixin/EntityRendererMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 876757f

Please sign in to comment.