Skip to content

Commit

Permalink
Display queue sizes in F3
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Jan 28, 2024
1 parent dfd9348 commit 809b1d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,7 @@ public Frustum getFrustum() {

public String getChunksDebugString() {
// C: visible/total
// TODO: add dirty and queued counts
return String.format("C: %s/%s", this.chunkRenderManager.getVisibleChunkCount(), this.chunkRenderManager.getTotalSections());
return String.format("C: %s/%s Q: %s+%si ", this.chunkRenderManager.getVisibleChunkCount(), this.chunkRenderManager.getTotalSections(), this.chunkRenderManager.getRebuildQueueSize(), this.chunkRenderManager.getImportantRebuildQueueSize());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,14 @@ public int getTotalSections() {
return this.columns.size() * 16;
}

public int getRebuildQueueSize() {
return this.rebuildQueue.size();
}

public int getImportantRebuildQueueSize() {
return this.importantRebuildQueue.size();
}

private void scheduleRebuildOffThread(int x, int y, int z, boolean important) {
Minecraft.getMinecraft().addScheduledTask(() -> this.scheduleRebuild(x, y, z, important));
}
Expand Down

0 comments on commit 809b1d3

Please sign in to comment.