Skip to content

Commit

Permalink
Merge pull request #17 from GTNewHorizons/fix_show_unnecessary_bar
Browse files Browse the repository at this point in the history
Fix showing unnecessary info on some items
  • Loading branch information
ghostflyby authored Apr 1, 2024
2 parents 50a55ba + 29fef12 commit e63a3cc
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -62,9 +62,10 @@ protected final void addHandler(@NotNull String className,
if (info != null) {
return info;
}
return DurabilityLikeInfo.empty;
}
}
return new DurabilityLikeInfo(0, 0);
return DurabilityLikeInfo.empty;
}

protected int getColor(DurabilityLikeInfo info) {
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@ public DurabilityLikeInfo(double current, double max) {
this.max = max;
}

public static final DurabilityLikeInfo empty = new DurabilityLikeInfo(0, 0);

public boolean isFull() {
return current != 0 && current == max;
}

0 comments on commit e63a3cc

Please sign in to comment.