Skip to content

Commit bb12857

Browse files
committed
[InfoHud] Add current input size to the playback index
Currently, the playback index only shows the current tick of the recording. Now a second variable is added to show the size of the recording with the format 0/0, with the second one being the size. To get the size, I use PlaybackController#size()-1 as the index is always one smaller than the size. And to not get negative numbers when no inputs are present, I use Math.max(size, 0)
1 parent 39f58a4 commit bb12857

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/minecrafttas/tasmod/gui/InfoHud.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,8 @@ public boolean checkInit() {
454454
+ "_visible")), Boolean.parseBoolean(configuration.getProperty(title + "_rect")), () -> {
455455
if (Minecraft.getMinecraft().currentScreen == this)
456456
return "PlaybackIndex";
457-
return Long.toString(TASmodClient.controller.index());
457+
458+
return String.format("%s/%s", TASmodClient.controller.index(), Math.max(TASmodClient.controller.size() - 1, 0L));
458459
}));
459460

460461
y = height - 14;

0 commit comments

Comments
 (0)