In-Game timer in bash
8 years ago
Sweden

Hello!

I wrote a quick bash script that reads the stats file (just like the In-Game timer written in .NET availiable on this site) and thought that it might be useful to somebody else. One of the advantages over the other one is that it saves the current time to a text file which is readable by for example OBS when recording. Another advantage is that it doesn't need wine/mono for running it on linux.

Source code: https://gist.github.com/ineentho/814b0f26c3940af519e9

Using it from a shell: First of make sure you have inotify installed (many Linux distros has it preinstalled) and then run

cd ~/.minecraft # Enter your .minecraft directory curl -o speed https://gist.githubusercontent.com/ineentho/814b0f26c3940af519e9/raw/fb99c7a9bd6a5afa758ced279c574ae1c743b465/speed.sh && chmod +x speed

When you have it installed, just run ./speed and follow the instructions. If something is unclear, the source is commented.

I did not include a way to reset the timer since I belive that the time should be counted from the moment the world is made, but if you want to I suppose you could just deduct the time after you are done.

Enjoy!

afyber and 1UpsForLife like this
Game stats
Followers
41,261
Runs
21,505
Players
7,673
Latest news
Updated Legal Mods
  • (1.20-1.20.6) StandardSettings 1.2.4 has been ported to 1.20-1.20.6.
  • (1.19+) Planifolia 1.0.1 for 1.19+: supports launching without Sodium for gamma 5 by itself and fixes a visual desync of the entity culling option when it is set via StandardSettings
  • **(1.19+)
12 days ago