Skip to content

Commit

Permalink
Fix Coord
Browse files Browse the repository at this point in the history
  • Loading branch information
6c0-o committed May 28, 2024
1 parent 9b2bb5d commit 15ded70
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/client/java/fr/sixczero/hud/data/Coordinates.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@ public class Coordinates {
private static Text text;
private static final MinecraftClient client = MinecraftClient.getInstance();

public static Text main(){
public static Text get(){
assert client.player != null;

x = (int)client.player.getX();
y = (int)client.player.getY();
z = (int)client.player.getZ();

xN = x / 8;
yN = y / 8;
zN = z / 8;

if (client.world.getRegistryKey() == World.OVERWORLD){
text = format.StringToText(6XYZ: §f %d %d %d (§c%d %d %d§f)", x, y, z, xN, yN, zN);
text = format.StringToText(eXYZ: §f %d %d %d (§c%d %d %d§f)", x, y, z, xN, y, zN);
} else if (client.world.getRegistryKey() == World.NETHER) {
text = format.StringToText(6XYZ: §f %d %d %d (§c%d %d %d§f)", x, y, z, x * 8, y, z * 8);
text = format.StringToText(eXYZ: §f %d %d %d (§a%d %d %d§f)", x, y, z, x * 8, y, z * 8);
} else if (client.world.getRegistryKey() == World.END) {
text = format.StringToText(6XYZ: §f %d %d %d", x, y, z);
text = format.StringToText(eXYZ: §f %d %d %d", x, y, z);
} else {
text = Text.of("Error");
}
Expand Down

0 comments on commit 15ded70

Please sign in to comment.