3131// and process accordingly
3232public class RenderGenerationService {
3333 private static final int MAX_HOLDING_SECTION_COUNT = 1000 ;
34+
35+ public static final AtomicInteger MESH_FAILED_COUNTER = new AtomicInteger ();
3436 private static final AtomicInteger COUNTER = new AtomicInteger ();
3537 private static final class BuildTask {
3638 WorldSection section ;
@@ -168,6 +170,7 @@ private void processJob(RenderDataFactory45 factory, IntOpenHashSet seenMissedId
168170 this .taskMapLock .unlockWrite (stamp );
169171
170172 if (other != null ) {//Weve been replaced
173+ MESH_FAILED_COUNTER .incrementAndGet ();
171174 //Request the block
172175 if (e .isIdBlockId ) {
173176 //TODO: maybe move this to _after_ task as been readded to queue??
@@ -206,6 +209,7 @@ private void processJob(RenderDataFactory45 factory, IntOpenHashSet seenMissedId
206209 }
207210
208211 if (task .hasDoneModelRequestInner && task .hasDoneModelRequestOuter ) {
212+ MESH_FAILED_COUNTER .incrementAndGet ();
209213 task .attempts ++;
210214 try {
211215 Thread .sleep (1 );
@@ -222,6 +226,7 @@ private void processJob(RenderDataFactory45 factory, IntOpenHashSet seenMissedId
222226 //If this happens... aahaha painnnn
223227 if (task .hasDoneModelRequestOuter ) {
224228 task .attempts ++;
229+ MESH_FAILED_COUNTER .incrementAndGet ();
225230 }
226231
227232 if ((!task .hasDoneModelRequestOuter ) && e .auxData != null ) {
@@ -332,8 +337,16 @@ public void shutdown() {
332337 }
333338 }
334339
340+ private long lastChangedTime = 0 ;
341+ private int failedCounter = 0 ;
335342 public void addDebugData (List <String > debug ) {
336- debug .add ("RSSQ: " + this .taskQueueCount .get ());//render section service queue
343+ if (System .currentTimeMillis ()-this .lastChangedTime > 1000 ) {
344+ this .failedCounter = 0 ;
345+ this .lastChangedTime = System .currentTimeMillis ();
346+ }
347+ this .failedCounter += MESH_FAILED_COUNTER .getAndSet (0 );
348+ debug .add ("RSSQ/TFC: " + this .taskQueueCount .get () + "/" + this .failedCounter );//render section service queue, Task Fail Counter
349+
337350 }
338351
339352 public int getTaskCount () {
0 commit comments