World Border (Fabric)

World Border (Fabric)

261k Downloads

Config to hide Y co-ordinate [Includes code snippets]

gaforb opened this issue ยท 1 comments

commented

Information

Mod name: GUI Compass
Pull Requests: I have no idea how they work

Feature description

Config to hide Y co-ordinate from the GUI - I took the liberty of writing out the code to save you some effort, since I'm asking for a feature here anyway. Hopefully they slot in with no trouble!

public final ForgeCOnfigSpec.ConfigValue<Boolean> hideYCoordinate;
hideYCoordinate = builder
	.comment("Hides the Y co-ordinate (depth) from the GUI compass.")
	.define("hideYCoordinate", false);
if (ConfigHandler.GENERAL.hideYCoordinate.get()) {
	return direction.get(facing) + ": " + ppos.getX() + ", " + ppos.getZ();
else {
	return direction.get(facing) + ": " + ppos.getX() + ", " + ppos.getY() + ", " + ppos.getZ();

Thanks

And a big thank you for creating all the mods you have done! This codebase is impeccable and so many of these small tweaks are the kind of thing that would be overlooked by larger mods, but are so important to making a cohesive, fun experience. I cant wait to see what else you make down the line!

commented

Thanks for the suggestion and using the mod! I made the config value a bit different because there were other requests for just the direction. I've added the config option 'guiCompassFormat'. In your case you wanted to just hide the Y value, so you can change the default "FXYZ" to "FXZ" which should work! :)

https://www.curseforge.com/minecraft/mc-mods/gui-compass