forked from RepoMirrors/kami-blue
make direction 1 letter and cleanup code for coords
This commit is contained in:
parent
41b9827ed1
commit
442c478dc2
|
@ -423,9 +423,11 @@ public class KamiGUI extends GUI {
|
||||||
int hposX = (int) (mc.player.posX * f);
|
int hposX = (int) (mc.player.posX * f);
|
||||||
int hposZ = (int) (mc.player.posZ * 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,
|
KamiMod.colour,
|
||||||
posX,
|
posX,
|
||||||
KamiMod.colour,
|
KamiMod.colour,
|
||||||
|
@ -444,7 +446,7 @@ public class KamiGUI extends GUI {
|
||||||
KamiMod.colour,
|
KamiMod.colour,
|
||||||
hposZ,
|
hposZ,
|
||||||
KamiMod.colour
|
KamiMod.colour
|
||||||
) + KamiMod.colour + "r " + direction.toUpperCase());
|
));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
frame.addChild(coordsLabel);
|
frame.addChild(coordsLabel);
|
||||||
|
|
Loading…
Reference in New Issue