File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
common/src/main/java/de/bluecolored/bluemap/common/rendermanager Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,16 @@ public boolean scheduleRenderTask(RenderTask task) {
150150 }
151151 }
152152
153+ public int scheduleRenderTasks (RenderTask ... tasks ) {
154+ synchronized (this .renderTasks ) {
155+ int count = 0 ;
156+ for (RenderTask task : tasks ) {
157+ if (scheduleRenderTask (task )) count ++;
158+ }
159+ return count ;
160+ }
161+ }
162+
153163 public boolean scheduleRenderTaskNext (RenderTask task ) {
154164 synchronized (this .renderTasks ) {
155165 if (renderTasks .size () <= 1 ) return scheduleRenderTask (task );
@@ -164,6 +174,9 @@ public boolean scheduleRenderTaskNext(RenderTask task) {
164174
165175 public int scheduleRenderTasksNext (RenderTask ... tasks ) {
166176 synchronized (this .renderTasks ) {
177+ if (renderTasks .size () <= 1 )
178+ return scheduleRenderTasks (tasks );
179+
167180 int count = 0 ;
168181 for (int i = tasks .length - 1 ; i >= 0 ; i --) {
169182 if (scheduleRenderTaskNext (tasks [i ])) count ++;
You can’t perform that action at this time.
0 commit comments