[Improvment] The ability to change the units #4

Closed
opened 2024-12-06 16:38:33 +01:00 by stacode123 · 3 comments
stacode123 commented 2024-12-06 16:38:33 +01:00 (Migrated from github.com)

.Title
Suggested Units:
km/h
miles/h

.Title Suggested Units: km/h miles/h
zaze06 commented 2024-12-11 19:23:10 +01:00 (Migrated from github.com)

Hi, This is already implumented, but requires you to ether open the config file or use Cloth Config mod to have access to it in game.
For Fabric the config file location is <minecraft directory>/config/speedometer/config.json and for NeoForged <minecraft directory>/config/speedometer/config.json, the minecraft directory chages depending on the luancer you use but typicaly you shuld be able to find the runtime directory for your profile, standerd in the vanilla Minecraft Launcher on windows is %appdata%\.minecraft.

To open the config menue you cal ether navigate to the mod's config ingame(again this requires cloth config) or you can press O(default key) to open the config menue when in game, this feature is mostly intended for Fabric if you dont have the Mod Menue mod.

If you dont whant to have cloth config installed you have to open the config file in a text editor like Notepad(Windows), Nano(CLI for Linux and Mac OS), or another text editor.

The file shuld look like this

{
    "xPosition": "W-3",
    "debug": false,
    "color": {
        "r": 16,
        "b": 158,
        "g": 146
    },
    "overrideColor": false,
    "useKnot": false,
    "yPosition": "H-3",
    "showVisualSpeedType": false,
    "imageSize": 19,
    "showSpeedType": true,
    "visualSpeedometer": false,
    "version": 4,
    "speed": "BlockPS" // This key, value defines the speed type used
}

the part your intrested in chaging whuld be the last one with the key speed and chage it to one of these enum values defined in SpeedTypes.java

MPH// Miles per Hour
KMPH// Kilometers per Hour
MPS// Meters per Second, same as Blocks per Second
BlockPS// Blocks per Second, same as Meters per Second
KNOT// Knot(the unit used for boats and airplanes)

So for exampel you whant to chage to Miles per hour, chage the speed from BlockPS to MPH.

Hope this helps!

Hi, This is already implumented, but requires you to ether open the config file or use [Cloth Config mod](https://modrinth.com/mod/cloth-config]) to have access to it in game. For Fabric the config file location is `<minecraft directory>/config/speedometer/config.json` and for NeoForged `<minecraft directory>/config/speedometer/config.json`, the minecraft directory chages depending on the luancer you use but typicaly you shuld be able to find the runtime directory for your profile, standerd in the vanilla Minecraft Launcher on windows is `%appdata%\.minecraft`. To open the config menue you cal ether navigate to the mod's config ingame(again this requires cloth config) or you can press `O`(default key) to open the config menue when in game, this feature is mostly intended for Fabric if you dont have the [Mod Menue mod](https://modrinth.com/mod/modmenu). If you dont whant to have cloth config installed you have to open the config file in a text editor like Notepad(Windows), Nano(CLI for Linux and Mac OS), or another text editor. The file shuld look like this ```json { "xPosition": "W-3", "debug": false, "color": { "r": 16, "b": 158, "g": 146 }, "overrideColor": false, "useKnot": false, "yPosition": "H-3", "showVisualSpeedType": false, "imageSize": 19, "showSpeedType": true, "visualSpeedometer": false, "version": 4, "speed": "BlockPS" // This key, value defines the speed type used } ``` the part your intrested in chaging whuld be the last one with the key `speed` and chage it to one of these enum values defined in [SpeedTypes.java](https://github.com/zaze06/Speedometer/blob/master/common/src/main/java/me/zacharias/speedometer/SpeedTypes.java) ``` MPH// Miles per Hour KMPH// Kilometers per Hour MPS// Meters per Second, same as Blocks per Second BlockPS// Blocks per Second, same as Meters per Second KNOT// Knot(the unit used for boats and airplanes) ``` So for exampel you whant to chage to Miles per hour, chage the `speed` from `BlockPS` to `MPH`. Hope this helps!
stacode123 commented 2024-12-11 19:25:46 +01:00 (Migrated from github.com)

OK Great Thanks for the detailed answer i appreciate it :)

OK Great Thanks for the detailed answer i appreciate it :)
zaze06 commented 2024-12-11 19:27:44 +01:00 (Migrated from github.com)

You're welcome, if more issues arises about this feal free to reopen this.
Best regards

You're welcome, if more issues arises about this feal free to reopen this. Best regards
Sign in to join this conversation.