mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 15:29:54 +00:00
reorder textColor
This commit is contained in:
1 parent
415de16917
commit
a31638f05f
1 file changed
+3
-4
@@ -58,9 +58,12 @@ public class GuiNpcAnvil extends GuiContainerNPCInterface {
|
||||
|
||||
// Compute the repair status message based on container.repairCost and player's XP.
|
||||
String status = "";
|
||||
int textColor = CustomNpcResourceListener.DefaultTextColor;
|
||||
|
||||
if (container.repairCost > 0) {
|
||||
if (container.repairCost > mc.thePlayer.experienceTotal) {
|
||||
status = "Repair cost: " + container.repairCost + " XP";
|
||||
textColor = 0xFF0000; // red when not enough XP
|
||||
} else {
|
||||
status = "Repair cost: " + container.repairCost + " XP";
|
||||
}
|
||||
@@ -72,10 +75,6 @@ public class GuiNpcAnvil extends GuiContainerNPCInterface {
|
||||
status = "Item is already fully repaired";
|
||||
}
|
||||
}
|
||||
int textColor = CustomNpcResourceListener.DefaultTextColor;
|
||||
if (container.repairCost > mc.thePlayer.experienceTotal) {
|
||||
textColor = 0xFF0000; // red when not enough XP
|
||||
}
|
||||
fontRendererObj.drawString(status, guiLeft + 5, guiTop + 75, textColor);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user