use of tonius.simplyjetpacks.item.IHUDInfoProvider in project SimplyJetpacks by Tonius.
the class HUDTickHandler method tickEnd.
private static void tickEnd() {
if (mc.thePlayer != null) {
if ((mc.currentScreen == null || Config.showHUDWhileChatting && mc.currentScreen instanceof GuiChat) && !mc.gameSettings.hideGUI && !mc.gameSettings.showDebugInfo) {
ItemStack chestplate = mc.thePlayer.getCurrentArmor(2);
if (chestplate != null && chestplate.getItem() instanceof IHUDInfoProvider) {
IHUDInfoProvider provider = (IHUDInfoProvider) chestplate.getItem();
List<String> info = new ArrayList<String>();
provider.addHUDInfo(info, chestplate, Config.enableFuelHUD, Config.enableStateHUD);
if (info.isEmpty()) {
return;
}
GL11.glPushMatrix();
mc.entityRenderer.setupOverlayRendering();
GL11.glScaled(Config.HUDScale, Config.HUDScale, 1.0D);
int i = 0;
for (String s : info) {
RenderUtils.drawStringAtHUDPosition(s, HUDPositions.values()[Config.HUDPosition], mc.fontRenderer, Config.HUDOffsetX, Config.HUDOffsetY, Config.HUDScale, 0xeeeeee, true, i);
i++;
}
GL11.glPopMatrix();
}
}
}
}
Aggregations