use of net.minecraft.scoreboard.ScorePlayerTeam in project MinecraftForge by MinecraftForge.
the class GuiIngameForge method renderGameOverlay.
@Override
public void renderGameOverlay(float partialTicks) {
res = new ScaledResolution(mc);
eventParent = new RenderGameOverlayEvent(partialTicks, res);
int width = res.getScaledWidth();
int height = res.getScaledHeight();
renderHealthMount = mc.player.getRidingEntity() instanceof EntityLivingBase;
renderFood = mc.player.getRidingEntity() == null;
renderJumpBar = mc.player.isRidingHorse();
right_height = 39;
left_height = 39;
if (pre(ALL))
return;
fontrenderer = mc.fontRendererObj;
mc.entityRenderer.setupOverlayRendering();
GlStateManager.enableBlend();
if (Minecraft.isFancyGraphicsEnabled()) {
renderVignette(mc.player.getBrightness(partialTicks), res);
} else {
GlStateManager.enableDepth();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
}
if (renderHelmet)
renderHelmet(res, partialTicks);
if (renderPortal && !mc.player.isPotionActive(MobEffects.NAUSEA)) {
renderPortal(res, partialTicks);
}
if (renderHotbar)
renderHotbar(res, partialTicks);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
zLevel = -90.0F;
rand.setSeed((long) (updateCounter * 312871));
if (renderCrosshairs)
renderCrosshairs(partialTicks);
if (renderBossHealth)
renderBossHealth();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
if (this.mc.playerController.shouldDrawHUD() && this.mc.getRenderViewEntity() instanceof EntityPlayer) {
if (renderHealth)
renderHealth(width, height);
if (renderArmor)
renderArmor(width, height);
if (renderFood)
renderFood(width, height);
if (renderHealthMount)
renderHealthMount(width, height);
if (renderAir)
renderAir(width, height);
}
renderSleepFade(width, height);
if (renderJumpBar) {
renderJumpBar(width, height);
} else if (renderExperiance) {
renderExperience(width, height);
}
renderToolHighlight(res);
renderHUDText(width, height);
renderFPSGraph();
renderPotionIcons(res);
renderRecordOverlay(width, height, partialTicks);
renderSubtitles(res);
renderTitle(width, height, partialTicks);
Scoreboard scoreboard = this.mc.world.getScoreboard();
ScoreObjective objective = null;
ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(mc.player.getName());
if (scoreplayerteam != null) {
int slot = scoreplayerteam.getChatFormat().getColorIndex();
if (slot >= 0)
objective = scoreboard.getObjectiveInDisplaySlot(3 + slot);
}
ScoreObjective scoreobjective1 = objective != null ? objective : scoreboard.getObjectiveInDisplaySlot(1);
if (renderObjective && scoreobjective1 != null) {
this.renderScoreboard(scoreobjective1, res);
}
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
GlStateManager.disableAlpha();
renderChat(width, height);
renderPlayerList(width, height);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableLighting();
GlStateManager.enableAlpha();
post(ALL);
}
Aggregations