private void renderVigorHud(ScaledResolution resolution, VigorData data) { if (data == null || data.getMaxEnergy() == 0 || AugConfig.vigorBarPosition == 4) return; if (TickHandlerClient.ticksInGame % 2 == 0) { intensitiy += fadeOut ? -0.025f : 0.025f; if (intensitiy <= 0f) { intensitiy = 0.1f; fadeOut = false; } else if (intensitiy >= 1f) fadeOut = true; } int sx = resolution.getScaledWidth(); int sy = resolution.getScaledHeight(); int baseX = (AugConfig.vigorBarPosition == 1 || AugConfig.vigorBarPosition == 2) ? (sx - 12) : 2; int baseY = (AugConfig.vigorBarPosition > 1) ? (sy - 78) : 2; int barX = (AugConfig.vigorBarPosition == 1 || AugConfig.vigorBarPosition == 2) ? (sx - 10) : 4; int barY = (AugConfig.vigorBarPosition > 1) ? (sy - 72) : 4; GlStateManager.pushMatrix(); RenderUtils.bindTexture(hudTexture); int baseTextureX = getTextureX(false); int baseTextureY = getTextureY(); GlStateManager.color(1f, 1f, 1f); RenderUtils.drawTexturedModalRect(baseX, baseY, 0, baseTextureX, baseTextureY, 10, 76); GlStateManager.color(1f, 1f, 1f); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); int barTextureX = getTextureX(true); int barTextureY = getTextureY(); int height = MathHelper.floor(68d * ((double) data.getEnergy() / (double) data.getMaxEnergy())); GlStateManager.color(1f, 1f, 1f); boolean flipped = AugConfig.vigorBarPosition > 1; RenderUtils.drawTexturedModalRect( barX, getBarY(barY, height, flipped), 0, barTextureX, getBarY(barTextureY, height, flipped), 6, height); GlStateManager.color(1f, 1f, 1f); GlStateManager.popMatrix(); }
@Override public void renderTileEntityAt( TileAltar tile, double x, double y, double z, float partialTicks, int destroyStage) { if (tile == null) return; GlStateManager.pushMatrix(); GlStateManager.enableBlend(); GlStateManager.blendFunc(0x302, 0x303); GlStateManager.translate(x + 0.5f, y + 1.65f, z + 0.5f); GlStateManager.rotate(180f, 1f, 0f, 0f); GlStateManager.scale(1.1, 1.1, 1.1); GL11.glColor4f(1f, 1f, 1f, 1f); RenderUtils.bindTexture(tile.isMaster() ? ALTAR_MASTER : ALTAR_BASE); model.renderBasic(RenderUtils.magicNum); GL11.glColor4f(1f, 1f, 1f, 1f); GlStateManager.disableBlend(); GlStateManager.popMatrix(); renderItem(tile, x, y, z, tile.getStackInSlot(0)); }