We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 659fb99 commit f1f2336Copy full SHA for f1f2336
BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/CombinedRenderTask.java
@@ -65,11 +65,13 @@ public synchronized boolean hasMoreWork() {
65
}
66
67
@Override
68
- public synchronized double estimateProgress() {
+ public double estimateProgress() {
69
if (!hasMoreWork()) return 1;
70
+ int currentTask = this.currentTaskIndex;
71
+ if (currentTask >= this.tasks.size()) return 1;
72
- double total = currentTaskIndex;
- total += this.tasks.get(this.currentTaskIndex).estimateProgress();
73
+ double total = currentTask;
74
+ total += this.tasks.get(currentTask).estimateProgress();
75
76
return total / tasks.size();
77
0 commit comments