Skip to content

Commit

Permalink
Add leading zeros to count
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Nov 5, 2024
1 parent cb826a2 commit 3d182a5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ public static void takeScreenshot(String name, Duration delay)

submitAndWait(client -> {
// Added a counter so that screenshots show up in the correct order
int count = screenshotCount.incrementAndGet();
String count =
String.format("%02d", screenshotCount.incrementAndGet());
String filename = count + "_" + name + ".png";
ScreenshotRecorder.saveScreenshot(
FabricLoader.getInstance().getGameDir().toFile(), filename,
Expand Down

0 comments on commit 3d182a5

Please sign in to comment.