Small changes to hud

This commit is contained in:
Gig 2015-06-14 19:41:41 +01:00
parent 3b6cd66cb7
commit 8ca96b8f27

View file

@ -52,22 +52,18 @@ public class ChargeHud
Color color = Color.GREEN; Color color = Color.GREEN;
double quarter = MaxCharge / 4; double quarter = MaxCharge / 4;
double half = MaxCharge / 2; double half = MaxCharge / 2;
double threeQuarters = MaxCharge / 4 * 3;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glEnable(32826); GL11.glEnable(32826);
RenderHelper.enableStandardItemLighting(); RenderHelper.enableStandardItemLighting();
RenderHelper.enableGUIStandardItemLighting(); RenderHelper.enableGUIStandardItemLighting();
//Render the stack //Render the stack
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, stack, 0, 0); RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, stack, 0, 0);
RenderItem.getInstance().renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, stack, 0, 0);
//Render Overlay //Render Overlay
if(CurrentCharge <= threeQuarters) RenderItem.getInstance().renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, stack, 0, 0);
{ //Get the color depending on current charge
color = Color.YELLOW;
}
if(CurrentCharge <= half) if(CurrentCharge <= half)
{ {
color = Color.RED; color = Color.YELLOW;
} }
if(CurrentCharge <= quarter) if(CurrentCharge <= quarter)
{ {