mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-28 07:35:47 +00:00
Stop error ledgers from showing tooltip when cleared
This commit is contained in:
1 parent
0251691d66
commit
9247ed1509
2 files changed
+7
-6
No files matched your search
@@ -71,7 +71,7 @@ public class ErrorLedger extends Ledger {
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
if (state == null) {
|
||||
if (!isVisible()) {
|
||||
return "";
|
||||
}
|
||||
return StringUtil.localize(state.getDescription());
|
||||
|
||||
@@ -130,15 +130,16 @@ public class LedgerManager {
|
||||
yPos += ledger.getHeight();
|
||||
}
|
||||
|
||||
ImmutableSet<IErrorState> errorStates = errorSource.getErrorStates();
|
||||
List<IErrorState> errorStates = new ArrayList<>(errorSource.getErrorStates());
|
||||
|
||||
yPos = 8;
|
||||
int index = 0;
|
||||
for (IErrorState errorState : errorStates) {
|
||||
if (index >= errorLedgers.size()) {
|
||||
break;
|
||||
for (ErrorLedger errorLedger : errorLedgers) {
|
||||
if (index >= errorStates.size()) {
|
||||
errorLedger.setState(null);
|
||||
continue;
|
||||
}
|
||||
ErrorLedger errorLedger = errorLedgers.get(index++);
|
||||
IErrorState errorState = errorStates.get(index++);
|
||||
errorLedger.setState(errorState);
|
||||
|
||||
errorLedger.update();
|
||||
|
||||
Reference in new issue
Block a user