make direction 1 letter and cleanup code for coords

This commit is contained in:
Bella 2020-03-12 22:21:13 -04:00
parent 41b9827ed1
commit 442c478dc2
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
1 changed files with 5 additions and 3 deletions

View File

@ -423,9 +423,11 @@ public class KamiGUI extends GUI {
int hposX = (int) (mc.player.posX * f);
int hposZ = (int) (mc.player.posZ * f);
String direction = mc.player.getHorizontalFacing().toString();
String direction = mc.player.getHorizontalFacing().toString().substring(0, 1).toUpperCase();
String colouredSeparator = KamiMod.colour + "7 " + KamiMod.separator + KamiMod.colour + "r";
coordsLabel.setText(String.format(" %sf%,d%s7, %sf%,d%s7, %sf%,d %s7(%sf%,d%s7, %sf%,d%s7, %sf%,d%s7)",
/* The 7 in the string formatter is the color */
coordsLabel.setText(direction + colouredSeparator + String.format(" %sf%,d%s7, %sf%,d%s7, %sf%,d %s7(%sf%,d%s7, %sf%,d%s7, %sf%,d%s7)",
KamiMod.colour,
posX,
KamiMod.colour,
@ -444,7 +446,7 @@ public class KamiGUI extends GUI {
KamiMod.colour,
hposZ,
KamiMod.colour
) + KamiMod.colour + "r " + direction.toUpperCase());
));
}
});
frame.addChild(coordsLabel);