reorder textColor

This commit is contained in:
Mark committed 2026-02-01 01:27:54 +03:00
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);
}