Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 10c69ab

Browse files
committed
add another few options to the coords hud
1 parent ce5f873 commit 10c69ab

File tree

7 files changed

+80
-63
lines changed

7 files changed

+80
-63
lines changed

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/hud/gui/hud/CoordsHud.java

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
import java.util.List;
2828

2929
import io.github.axolotlclient.AxolotlClientConfig.api.options.Option;
30-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.BooleanOption;
31-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.ColorOption;
32-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.EnumOption;
33-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.IntegerOption;
30+
import io.github.axolotlclient.AxolotlClientConfig.impl.options.*;
3431
import io.github.axolotlclient.modules.hud.gui.component.DynamicallyPositionable;
3532
import io.github.axolotlclient.modules.hud.gui.entry.TextHudEntry;
3633
import io.github.axolotlclient.modules.hud.gui.layout.AnchorPoint;
@@ -59,6 +56,9 @@ public class CoordsHud extends TextHudEntry implements DynamicallyPositionable {
5956
private final IntegerOption decimalPlaces = new IntegerOption("decimalplaces", 0, 0, 15);
6057
private final BooleanOption minimal = new BooleanOption("minimal", false);
6158
private final BooleanOption biome = new BooleanOption("show_biome", false);
59+
private final StringOption delimiter = new StringOption("coordshud.delimiter", ": ");
60+
private final StringOption separator = new StringOption("coordshud.separator", ", ");
61+
private final ColorOption separatorColor = new ColorOption("coordshud.separator.color", firstColor.getDefault());
6262

6363
private final EnumOption<AnchorPoint> anchor = new EnumOption<>("anchorpoint", AnchorPoint.class, AnchorPoint.TOP_MIDDLE);
6464

@@ -136,14 +136,14 @@ public void renderComponent(MatrixStack matrices, float delta) {
136136
int width, height;
137137
if (minimal.get()) {
138138
int currPos = pos.x() + 1;
139-
String separator = ", ";
140-
currPos = drawString(matrices, "XYZ: ", currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
139+
String separator = this.separator.get();
140+
currPos = drawString(matrices, "XYZ"+delimiter.get(), currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
141141
currPos = drawString(matrices, df.format(x), currPos, pos.y() + 2, secondColor.get().toInt(),
142142
shadow.get());
143-
currPos = drawString(matrices, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
143+
currPos = drawString(matrices, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
144144
currPos = drawString(matrices, df.format(y), currPos, pos.y() + 2, secondColor.get().toInt(),
145145
shadow.get());
146-
currPos = drawString(matrices, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
146+
currPos = drawString(matrices, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
147147
currPos = drawString(matrices, df.format(z), currPos, pos.y() + 2, secondColor.get().toInt(),
148148
shadow.get());
149149
width = currPos - pos.x() + 2;
@@ -265,14 +265,14 @@ public void renderPlaceholderComponent(MatrixStack matrices, float delta) {
265265
int width, height;
266266
if (minimal.get()) {
267267
int currPos = pos.x() + 1;
268-
String separator = ", ";
269-
currPos = drawString(matrices, "XYZ: ", currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
268+
String separator = this.separator.get();
269+
currPos = drawString(matrices, "XYZ"+delimiter.get(), currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
270270
currPos = drawString(matrices, df.format(x), currPos, pos.y() + 2, secondColor.get().toInt(),
271271
shadow.get());
272-
currPos = drawString(matrices, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
272+
currPos = drawString(matrices, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
273273
currPos = drawString(matrices, df.format(y), currPos, pos.y() + 2, secondColor.get().toInt(),
274274
shadow.get());
275-
currPos = drawString(matrices, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
275+
currPos = drawString(matrices, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
276276
currPos = drawString(matrices, df.format(z), currPos, pos.y() + 2, secondColor.get().toInt(),
277277
shadow.get());
278278
width = currPos - pos.x() + 2;
@@ -341,6 +341,9 @@ public List<Option<?>> getConfigurationOptions() {
341341
options.add(minimal);
342342
options.add(biome);
343343
options.add(anchor);
344+
options.add(delimiter);
345+
options.add(separator);
346+
options.add(separatorColor);
344347
return options;
345348
}
346349

1.20/src/main/java/io/github/axolotlclient/modules/hud/gui/hud/CoordsHud.java

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
import java.util.List;
2828

2929
import io.github.axolotlclient.AxolotlClientConfig.api.options.Option;
30-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.BooleanOption;
31-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.ColorOption;
32-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.EnumOption;
33-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.IntegerOption;
30+
import io.github.axolotlclient.AxolotlClientConfig.impl.options.*;
3431
import io.github.axolotlclient.modules.hud.gui.component.DynamicallyPositionable;
3532
import io.github.axolotlclient.modules.hud.gui.entry.TextHudEntry;
3633
import io.github.axolotlclient.modules.hud.gui.layout.AnchorPoint;
@@ -62,6 +59,9 @@ public class CoordsHud extends TextHudEntry implements DynamicallyPositionable {
6259
private final IntegerOption decimalPlaces = new IntegerOption("decimalplaces", 0, 0, 15);
6360
private final BooleanOption minimal = new BooleanOption("minimal", false);
6461
private final BooleanOption biome = new BooleanOption("show_biome", false);
62+
private final StringOption delimiter = new StringOption("coordshud.delimiter", ": ");
63+
private final StringOption separator = new StringOption("coordshud.separator", ", ");
64+
private final ColorOption separatorColor = new ColorOption("coordshud.separator.color", firstColor.getDefault());
6565

6666
private final EnumOption<AnchorPoint> anchor = new EnumOption<>("anchorpoint", AnchorPoint.class, AnchorPoint.TOP_MIDDLE);
6767

@@ -140,14 +140,14 @@ public void renderComponent(GuiGraphics graphics, float delta) {
140140
int width, height;
141141
if (minimal.get()) {
142142
int currPos = pos.x() + 1;
143-
String separator = ", ";
144-
currPos = graphics.drawText(textRenderer, "XYZ: ", currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
143+
String separator = this.separator.get();
144+
currPos = graphics.drawText(textRenderer, "XYZ"+delimiter.get(), currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
145145
currPos = graphics.drawText(textRenderer, df.format(x), currPos, pos.y() + 2, secondColor.get().toInt(),
146146
shadow.get());
147-
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
147+
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
148148
currPos = graphics.drawText(textRenderer, df.format(y), currPos, pos.y() + 2, secondColor.get().toInt(),
149149
shadow.get());
150-
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
150+
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
151151
currPos = graphics.drawText(textRenderer, df.format(z), currPos, pos.y() + 2, secondColor.get().toInt(),
152152
shadow.get());
153153
width = currPos - pos.x() + 2;
@@ -270,14 +270,14 @@ public void renderPlaceholderComponent(GuiGraphics graphics, float delta) {
270270
int width, height;
271271
if (minimal.get()) {
272272
int currPos = pos.x() + 1;
273-
String separator = ", ";
274-
currPos = graphics.drawText(textRenderer, "XYZ: ", currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
273+
String separator = this.separator.get();
274+
currPos = graphics.drawText(textRenderer, "XYZ"+delimiter.get(), currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
275275
currPos = graphics.drawText(textRenderer, df.format(x), currPos, pos.y() + 2, secondColor.get().toInt(),
276276
shadow.get());
277-
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
277+
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
278278
currPos = graphics.drawText(textRenderer, df.format(y), currPos, pos.y() + 2, secondColor.get().toInt(),
279279
shadow.get());
280-
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
280+
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
281281
currPos = graphics.drawText(textRenderer, df.format(z), currPos, pos.y() + 2, secondColor.get().toInt(),
282282
shadow.get());
283283
width = currPos - pos.x() + 2;
@@ -346,6 +346,9 @@ public List<Option<?>> getConfigurationOptions() {
346346
options.add(minimal);
347347
options.add(biome);
348348
options.add(anchor);
349+
options.add(delimiter);
350+
options.add(separator);
351+
options.add(separatorColor);
349352
return options;
350353
}
351354

1.21.4/src/main/java/io/github/axolotlclient/modules/hud/gui/hud/CoordsHud.java

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
import java.util.List;
2828

2929
import io.github.axolotlclient.AxolotlClientConfig.api.options.Option;
30-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.BooleanOption;
31-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.ColorOption;
32-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.EnumOption;
33-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.IntegerOption;
30+
import io.github.axolotlclient.AxolotlClientConfig.impl.options.*;
3431
import io.github.axolotlclient.modules.hud.gui.component.DynamicallyPositionable;
3532
import io.github.axolotlclient.modules.hud.gui.entry.TextHudEntry;
3633
import io.github.axolotlclient.modules.hud.gui.layout.AnchorPoint;
@@ -62,6 +59,9 @@ public class CoordsHud extends TextHudEntry implements DynamicallyPositionable {
6259
private final IntegerOption decimalPlaces = new IntegerOption("decimalplaces", 0, 0, 15);
6360
private final BooleanOption minimal = new BooleanOption("minimal", false);
6461
private final BooleanOption biome = new BooleanOption("show_biome", false);
62+
private final StringOption delimiter = new StringOption("coordshud.delimiter", ": ");
63+
private final StringOption separator = new StringOption("coordshud.separator", ", ");
64+
private final ColorOption separatorColor = new ColorOption("coordshud.separator.color", firstColor.getDefault());
6565

6666
private final EnumOption<AnchorPoint> anchor =
6767
new EnumOption<>("anchorpoint", AnchorPoint.class, AnchorPoint.TOP_MIDDLE);
@@ -141,14 +141,14 @@ public void renderComponent(GuiGraphics graphics, float delta) {
141141
int width, height;
142142
if (minimal.get()) {
143143
int currPos = pos.x() + 1;
144-
String separator = ", ";
145-
currPos = graphics.drawString(textRenderer, "XYZ: ", currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
144+
String separator = this.separator.get();
145+
currPos = graphics.drawString(textRenderer, "XYZ"+delimiter.get(), currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
146146
currPos = graphics.drawString(textRenderer, df.format(x), currPos, pos.y() + 2, secondColor.get().toInt(),
147147
shadow.get());
148-
currPos = graphics.drawString(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
148+
currPos = graphics.drawString(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
149149
currPos = graphics.drawString(textRenderer, df.format(y), currPos, pos.y() + 2, secondColor.get().toInt(),
150150
shadow.get());
151-
currPos = graphics.drawString(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
151+
currPos = graphics.drawString(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
152152
currPos = graphics.drawString(textRenderer, df.format(z), currPos, pos.y() + 2, secondColor.get().toInt(),
153153
shadow.get());
154154
width = currPos - pos.x() + 2;
@@ -271,14 +271,14 @@ public void renderPlaceholderComponent(GuiGraphics graphics, float delta) {
271271
int width, height;
272272
if (minimal.get()) {
273273
int currPos = pos.x() + 1;
274-
String separator = ", ";
275-
currPos = graphics.drawString(textRenderer, "XYZ: ", currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
274+
String separator = this.separator.get();
275+
currPos = graphics.drawString(textRenderer, "XYZ"+delimiter.get(), currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
276276
currPos = graphics.drawString(textRenderer, df.format(x), currPos, pos.y() + 2, secondColor.get().toInt(),
277277
shadow.get());
278-
currPos = graphics.drawString(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
278+
currPos = graphics.drawString(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
279279
currPos = graphics.drawString(textRenderer, df.format(y), currPos, pos.y() + 2, secondColor.get().toInt(),
280280
shadow.get());
281-
currPos = graphics.drawString(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
281+
currPos = graphics.drawString(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
282282
currPos = graphics.drawString(textRenderer, df.format(z), currPos, pos.y() + 2, secondColor.get().toInt(),
283283
shadow.get());
284284
width = currPos - pos.x() + 2;
@@ -347,6 +347,9 @@ public List<Option<?>> getConfigurationOptions() {
347347
options.add(minimal);
348348
options.add(biome);
349349
options.add(anchor);
350+
options.add(delimiter);
351+
options.add(separator);
352+
options.add(separatorColor);
350353
return options;
351354
}
352355

1.21/src/main/java/io/github/axolotlclient/modules/hud/gui/hud/CoordsHud.java

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
import java.util.List;
2828

2929
import io.github.axolotlclient.AxolotlClientConfig.api.options.Option;
30-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.BooleanOption;
31-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.ColorOption;
32-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.EnumOption;
33-
import io.github.axolotlclient.AxolotlClientConfig.impl.options.IntegerOption;
30+
import io.github.axolotlclient.AxolotlClientConfig.impl.options.*;
3431
import io.github.axolotlclient.modules.hud.gui.component.DynamicallyPositionable;
3532
import io.github.axolotlclient.modules.hud.gui.entry.TextHudEntry;
3633
import io.github.axolotlclient.modules.hud.gui.layout.AnchorPoint;
@@ -62,6 +59,9 @@ public class CoordsHud extends TextHudEntry implements DynamicallyPositionable {
6259
private final IntegerOption decimalPlaces = new IntegerOption("decimalplaces", 0, 0, 15);
6360
private final BooleanOption minimal = new BooleanOption("minimal", false);
6461
private final BooleanOption biome = new BooleanOption("show_biome", false);
62+
private final StringOption delimiter = new StringOption("coordshud.delimiter", ": ");
63+
private final StringOption separator = new StringOption("coordshud.separator", ", ");
64+
private final ColorOption separatorColor = new ColorOption("coordshud.separator.color", firstColor.getDefault());
6565

6666
private final EnumOption<AnchorPoint> anchor = new EnumOption<>("anchorpoint", AnchorPoint.class, AnchorPoint.TOP_MIDDLE);
6767

@@ -140,14 +140,14 @@ public void renderComponent(GuiGraphics graphics, float delta) {
140140
int width, height;
141141
if (minimal.get()) {
142142
int currPos = pos.x() + 1;
143-
String separator = ", ";
144-
currPos = graphics.drawText(textRenderer, "XYZ: ", currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
143+
String separator = this.separator.get();
144+
currPos = graphics.drawText(textRenderer, "XYZ"+delimiter.get(), currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
145145
currPos = graphics.drawText(textRenderer, df.format(x), currPos, pos.y() + 2, secondColor.get().toInt(),
146146
shadow.get());
147-
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
147+
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
148148
currPos = graphics.drawText(textRenderer, df.format(y), currPos, pos.y() + 2, secondColor.get().toInt(),
149149
shadow.get());
150-
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
150+
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
151151
currPos = graphics.drawText(textRenderer, df.format(z), currPos, pos.y() + 2, secondColor.get().toInt(),
152152
shadow.get());
153153
width = currPos - pos.x() + 2;
@@ -270,14 +270,14 @@ public void renderPlaceholderComponent(GuiGraphics graphics, float delta) {
270270
int width, height;
271271
if (minimal.get()) {
272272
int currPos = pos.x() + 1;
273-
String separator = ", ";
274-
currPos = graphics.drawText(textRenderer, "XYZ: ", currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
273+
String separator = this.separator.get();
274+
currPos = graphics.drawText(textRenderer, "XYZ"+delimiter.get(), currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
275275
currPos = graphics.drawText(textRenderer, df.format(x), currPos, pos.y() + 2, secondColor.get().toInt(),
276276
shadow.get());
277-
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
277+
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
278278
currPos = graphics.drawText(textRenderer, df.format(y), currPos, pos.y() + 2, secondColor.get().toInt(),
279279
shadow.get());
280-
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, firstColor.get().toInt(), shadow.get());
280+
currPos = graphics.drawText(textRenderer, separator, currPos, pos.y() + 2, separatorColor.get().toInt(), shadow.get());
281281
currPos = graphics.drawText(textRenderer, df.format(z), currPos, pos.y() + 2, secondColor.get().toInt(),
282282
shadow.get());
283283
width = currPos - pos.x() + 2;
@@ -346,6 +346,9 @@ public List<Option<?>> getConfigurationOptions() {
346346
options.add(minimal);
347347
options.add(biome);
348348
options.add(anchor);
349+
options.add(delimiter);
350+
options.add(separator);
351+
options.add(separatorColor);
349352
return options;
350353
}
351354

0 commit comments

Comments
 (0)