Java 类net.minecraft.entity.boss.BossStatus 实例源码

项目:BaseClient    文件:GuiIngame.java   
/**
 * Renders dragon's (boss) health on the HUD
 */
private void renderBossHealth() {
    if (BossStatus.bossName != null && BossStatus.statusBarTime > 0) {
        --BossStatus.statusBarTime;
        FontRenderer fontrenderer = this.mc.fontRendererObj;
        ScaledResolution scaledresolution = new ScaledResolution(this.mc);
        int i = scaledresolution.getScaledWidth();
        short short1 = 182;
        int j = i / 2 - short1 / 2;
        int k = (int) (BossStatus.healthScale * (float) (short1 + 1));
        byte b0 = 12;
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);

        if (k > 0) {
            this.drawTexturedModalRect(j, b0, 0, 79, k, 5);
        }

        String s = BossStatus.bossName;
        this.getFontRenderer().drawStringWithShadow(s,
                (float) (i / 2 - this.getFontRenderer().getStringWidth(s) / 2), (float) (b0 - 10), 16777215);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(icons);
    }
}
项目:4Space-5    文件:GuiIngame.java   
protected void renderBossHealth()
{
    if ((BossStatus.bossName != null) && (BossStatus.statusBarTime > 0))
    {
        BossStatus.statusBarTime -= 1;
        FontRenderer fontrenderer = this.mc.fontRenderer;
        ScaledResolution scaledresolution = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
        int i = scaledresolution.getScaledWidth();
        short short1 = 182;
        int j = i / 2 - short1 / 2;
        int k = (int)(BossStatus.healthScale * (short1 + 1));
        byte b0 = 12;
        drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        if (k > 0) {
            drawTexturedModalRect(j, b0, 0, 79, k, 5);
        }
        String s = BossStatus.bossName;
        fontrenderer.drawStringWithShadow(s, i / 2 - fontrenderer.getStringWidth(s) / 2, b0 - 10, 16777215);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(icons);
    }
}
项目:DurabilityViewer    文件:ArmourSlotsHandler.java   
private int yPos(int height)
{
    if (LiteModDurabilityViewer.instance.ArmourLoc == 0)
    {
        if (BossStatus.bossName != null && BossStatus.statusBarTime > 0)    return 22;
        else                                                                return 2;
    }
    else if (LiteModDurabilityViewer.instance.ArmourLoc == 1 || LiteModDurabilityViewer.instance.ArmourLoc == 2)
    {
        return height - 20;
    }
    else
    {
        //this should never be the case, but users always manage to break things.
        LiteModDurabilityViewer.instance.ArmourLoc = 0;

        if (BossStatus.bossName != null && BossStatus.statusBarTime > 0)    return 22;
        else                                                                return 2;
    }
}
项目:4Space-1.7    文件:GuiIngame.java   
protected void renderBossHealth()
{
    if ((BossStatus.bossName != null) && (BossStatus.statusBarTime > 0))
    {
        BossStatus.statusBarTime -= 1;
        FontRenderer fontrenderer = this.mc.fontRenderer;
        ScaledResolution scaledresolution = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
        int i = scaledresolution.getScaledWidth();
        short short1 = 182;
        int j = i / 2 - short1 / 2;
        int k = (int)(BossStatus.healthScale * (short1 + 1));
        byte b0 = 12;
        drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        if (k > 0) {
            drawTexturedModalRect(j, b0, 0, 79, k, 5);
        }
        String s = BossStatus.bossName;
        fontrenderer.drawStringWithShadow(s, i / 2 - fontrenderer.getStringWidth(s) / 2, b0 - 10, 16777215);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(icons);
    }
}
项目:Cauldron    文件:GuiIngame.java   
protected void renderBossHealth()
{
    if (BossStatus.bossName != null && BossStatus.statusBarTime > 0)
    {
        --BossStatus.statusBarTime;
        FontRenderer fontrenderer = this.mc.fontRenderer;
        ScaledResolution scaledresolution = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
        int i = scaledresolution.getScaledWidth();
        short short1 = 182;
        int j = i / 2 - short1 / 2;
        int k = (int)(BossStatus.healthScale * (float)(short1 + 1));
        byte b0 = 12;
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);

        if (k > 0)
        {
            this.drawTexturedModalRect(j, b0, 0, 79, k, 5);
        }

        String s = BossStatus.bossName;
        fontrenderer.drawStringWithShadow(s, i / 2 - fontrenderer.getStringWidth(s) / 2, b0 - 10, 16777215);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(icons);
    }
}
项目:Cauldron    文件:GuiIngame.java   
protected void renderBossHealth()
{
    if (BossStatus.bossName != null && BossStatus.statusBarTime > 0)
    {
        --BossStatus.statusBarTime;
        FontRenderer fontrenderer = this.mc.fontRenderer;
        ScaledResolution scaledresolution = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
        int i = scaledresolution.getScaledWidth();
        short short1 = 182;
        int j = i / 2 - short1 / 2;
        int k = (int)(BossStatus.healthScale * (float)(short1 + 1));
        byte b0 = 12;
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);

        if (k > 0)
        {
            this.drawTexturedModalRect(j, b0, 0, 79, k, 5);
        }

        String s = BossStatus.bossName;
        fontrenderer.drawStringWithShadow(s, i / 2 - fontrenderer.getStringWidth(s) / 2, b0 - 10, 16777215);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(icons);
    }
}
项目:RuneCraftery    文件:GuiIngame.java   
protected void func_73828_d() {
   if(BossStatus.field_82827_c != null && BossStatus.field_82826_b > 0) {
      --BossStatus.field_82826_b;
      FontRenderer var1 = this.field_73839_d.field_71466_p;
      ScaledResolution var2 = new ScaledResolution(this.field_73839_d.field_71474_y, this.field_73839_d.field_71443_c, this.field_73839_d.field_71440_d);
      int var3 = var2.func_78326_a();
      short var4 = 182;
      int var5 = var3 / 2 - var4 / 2;
      int var6 = (int)(BossStatus.field_82828_a * (float)(var4 + 1));
      byte var7 = 12;
      this.func_73729_b(var5, var7, 0, 74, var4, 5);
      this.func_73729_b(var5, var7, 0, 74, var4, 5);
      if(var6 > 0) {
         this.func_73729_b(var5, var7, 0, 79, var6, 5);
      }

      String var8 = BossStatus.field_82827_c;
      var1.func_78261_a(var8, var3 / 2 - var1.func_78256_a(var8) / 2, var7 - 10, 16777215);
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
      this.field_73839_d.func_110434_K().func_110577_a(field_110324_m);
   }
}
项目:Morph    文件:ModelInfo.java   
public void forceRender(Entity ent, double d, double d1, double d2, float f, float f1)
{
    float bossHealthScale = BossStatus.healthScale;
    int bossStatusBarTime = BossStatus.statusBarTime;
    String bossName = BossStatus.bossName;
    boolean hasColorModifier = BossStatus.hasColorModifier;

    if(RenderManager.instance.renderEngine != null && RenderManager.instance.livingPlayer != null)
    {
           try
           {
               entRender.doRender(ent, d, d1, d2, f, f1);
           }
           catch(Exception e)
           {
               Morph.console("A morph/model is causing an exception when Morph tries to render it! You might want to report this to the author of the Morphed mob (Not to Morph!)", true);
           }
    }

    BossStatus.healthScale = bossHealthScale;
    BossStatus.statusBarTime = bossStatusBarTime;
    BossStatus.bossName = bossName;
    BossStatus.hasColorModifier = hasColorModifier;
}
项目:HudPlus    文件:HPBossHealth.java   
@Override
public void render(Minecraft mc, ScaledResolution res, float partialTicks, HPHud hud) {
    super.render(mc, res, partialTicks, hud);
    hud.bindTexture(ICONS);
       --BossStatus.statusBarLength;

       FontRenderer fr = hud.fontrenderer;
       short barWidth = 182;
       int currentBossHealth = (int)(BossStatus.healthScale * (float)(barWidth + 1));
       int x = halfWidth - (barWidth / 2);
       //draws the background of the boss health bar
       hud.drawTexturedModalRect(x, 12, 0, 74, barWidth, 5);

       //draws the boss's current health
       if (currentBossHealth > 0) {
           hud.drawTexturedModalRect(x, 12, 0, 79, currentBossHealth, 5);
       }

       String bossname = BossStatus.bossName;
       fr.drawStringWithShadow(bossname, halfWidth - (fr.getStringWidth(bossname) / 2), 2, 16777215);
       GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
项目:Soul-Forest    文件:RenderKingKotek.java   
/**
    * Determines whether Slime Render should pass or not.
    */
   protected int shouldSlimeRenderPass(EntityKingKotek par1EntitySlime, int par2, float par3){
BossStatus.setBossStatus(par1EntitySlime, false);
if (par1EntitySlime.isInvisible()){
    return 0;
}
else if (par2 == 0){
    this.setRenderPassModel(this.scaleAmount);
    GL11.glEnable(GL11.GL_NORMALIZE);
    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    return 1;
}
else{
    if (par2 == 1){
    GL11.glDisable(GL11.GL_BLEND);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    }

    return -1;
}
   }
项目:DecompiledMinecraft    文件:RenderDragon.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityDragon entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    BossStatus.setBossStatus(entity, false);
    super.doRender(entity, x, y, z, entityYaw, partialTicks);

    if (entity.healingEnderCrystal != null)
    {
        this.drawRechargeRay(entity, x, y, z, partialTicks);
    }
}
项目:DecompiledMinecraft    文件:GuiIngame.java   
/**
 * Renders dragon's (boss) health on the HUD
 */
private void renderBossHealth()
{
    if (BossStatus.bossName != null && BossStatus.statusBarTime > 0)
    {
        --BossStatus.statusBarTime;
        FontRenderer fontrenderer = this.mc.fontRendererObj;
        ScaledResolution scaledresolution = new ScaledResolution(this.mc);
        int i = scaledresolution.getScaledWidth();
        int j = 182;
        int k = i / 2 - j / 2;
        int l = (int)(BossStatus.healthScale * (float)(j + 1));
        int i1 = 12;
        this.drawTexturedModalRect(k, i1, 0, 74, j, 5);
        this.drawTexturedModalRect(k, i1, 0, 74, j, 5);

        if (l > 0)
        {
            this.drawTexturedModalRect(k, i1, 0, 79, l, 5);
        }

        String s = BossStatus.bossName;
        this.getFontRenderer().drawStringWithShadow(s, (float)(i / 2 - this.getFontRenderer().getStringWidth(s) / 2), (float)(i1 - 10), 16777215);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(icons);
    }
}
项目:BaseClient    文件:RenderDragon.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityDragon entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    BossStatus.setBossStatus(entity, false);
    super.doRender(entity, x, y, z, entityYaw, partialTicks);

    if (entity.healingEnderCrystal != null)
    {
        this.drawRechargeRay(entity, x, y, z, partialTicks);
    }
}
项目:BaseClient    文件:GuiIngame.java   
/**
 * Renders dragon's (boss) health on the HUD
 */
private void renderBossHealth()
{
    if (BossStatus.bossName != null && BossStatus.statusBarTime > 0)
    {
        --BossStatus.statusBarTime;
        FontRenderer fontrenderer = this.mc.fontRendererObj;
        ScaledResolution scaledresolution = new ScaledResolution(this.mc);
        int i = scaledresolution.getScaledWidth();
        short short1 = 182;
        int j = i / 2 - short1 / 2;
        int k = (int)(BossStatus.healthScale * (float)(short1 + 1));
        byte b0 = 12;
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);

        if (k > 0)
        {
            this.drawTexturedModalRect(j, b0, 0, 79, k, 5);
        }

        String s = BossStatus.bossName;
        int l = 16777215;

        if (Config.isCustomColors())
        {
            l = CustomColors.getBossTextColor(l);
        }

        this.getFontRenderer().drawStringWithShadow(s, (float)(i / 2 - this.getFontRenderer().getStringWidth(s) / 2), (float)(b0 - 10), l);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(icons);
    }
}
项目:BaseClient    文件:RenderDragon.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityDragon entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    BossStatus.setBossStatus(entity, false);
    super.doRender(entity, x, y, z, entityYaw, partialTicks);

    if (entity.healingEnderCrystal != null)
    {
        this.drawRechargeRay(entity, x, y, z, partialTicks);
    }
}
项目:BaseClient    文件:Minecraft.java   
public MusicTicker.MusicType getAmbientMusicType() {
    return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell
            ? MusicTicker.MusicType.NETHER
            : (this.thePlayer.worldObj.provider instanceof WorldProviderEnd
                    ? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS
                            : MusicTicker.MusicType.END)
                    : (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying
                            ? MusicTicker.MusicType.CREATIVE
                            : MusicTicker.MusicType.GAME)))
            : MusicTicker.MusicType.MENU;
}
项目:4Space-5    文件:RenderCreeperBoss.java   
@Override
public void doRender(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
{
    BossStatus.setBossStatus((IBossDisplayData) par1EntityLiving, false);

    super.doRender(par1EntityLiving, par2, par4, par6, par8, par9);
}
项目:4Space-5    文件:RenderEvolvedSkeletonBoss.java   
@Override
public void doRender(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
{
    BossStatus.setBossStatus((IBossDisplayData) par1EntityLiving, false);

    super.doRender(par1EntityLiving, par2, par4, par6, par8, par9);
}
项目:amunra    文件:RenderFirstBoss.java   
@Override
public void doRender(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
{
    BossStatus.setBossStatus((IBossDisplayData) par1EntityLiving, false);

    super.doRender(par1EntityLiving, par2, par4, par6, par8, par9);
}
项目:Resilience-Client-Source    文件:RenderWither.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
 */
public void doRender(EntityWither par1EntityWither, double par2, double par4, double par6, float par8, float par9)
{
    BossStatus.setBossStatus(par1EntityWither, true);
    int var10 = ((ModelWither)this.mainModel).func_82903_a();

    if (var10 != this.field_82419_a)
    {
        this.field_82419_a = var10;
        this.mainModel = new ModelWither();
    }

    super.doRender((EntityLiving)par1EntityWither, par2, par4, par6, par8, par9);
}
项目:Resilience-Client-Source    文件:GuiIngame.java   
/**
 * Renders dragon's (boss) health on the HUD
 */
private void renderBossHealth()
{
    if (BossStatus.bossName != null && BossStatus.statusBarTime > 0)
    {
        --BossStatus.statusBarTime;
        FontRenderer var1 = this.mc.fontRenderer;
        ScaledResolution var2 = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
        int var3 = var2.getScaledWidth();
        short var4 = 182;
        int var5 = var3 / 2 - var4 / 2;
        int var6 = (int)(BossStatus.healthScale * (float)(var4 + 1));
        byte var7 = 12;
        this.drawTexturedModalRect(var5, var7, 0, 74, var4, 5);
        this.drawTexturedModalRect(var5, var7, 0, 74, var4, 5);

        if (var6 > 0)
        {
            this.drawTexturedModalRect(var5, var7, 0, 79, var6, 5);
        }

        String var8 = BossStatus.bossName;
        var1.drawStringWithShadow(var8, var3 / 2 - var1.getStringWidth(var8) / 2, var7 - 10, 16777215);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(icons);
    }
}
项目:Cauldron    文件:RenderWither.java   
public void doRender(EntityWither p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
    BossStatus.setBossStatus(p_76986_1_, true);
    int i = ((ModelWither)this.mainModel).func_82903_a();

    if (i != this.field_82419_a)
    {
        this.field_82419_a = i;
        this.mainModel = new ModelWither();
    }

    super.doRender((EntityLiving)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
项目:Cauldron    文件:RenderWither.java   
public void doRender(EntityWither p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
    BossStatus.setBossStatus(p_76986_1_, true);
    int i = ((ModelWither)this.mainModel).func_82903_a();

    if (i != this.field_82419_a)
    {
        this.field_82419_a = i;
        this.mainModel = new ModelWither();
    }

    super.doRender((EntityLiving)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
项目:ZeldaSwordSkills    文件:RenderGenericLiving.java   
@Override
public void doRender(EntityLiving entity, double dx, double dy, double dz, float yaw, float partialTick) {
    if (entity instanceof IBossDisplayData) {
        BossStatus.setBossStatus((IBossDisplayData) entity, true);
    }
    super.doRender(entity, dx, dy, dz, yaw, partialTick);
}
项目:ZeldaSwordSkills    文件:RenderEntityWizzrobe.java   
@Override
public void doRender(EntityWizzrobe entity, double dx, double dy, double dz, float yaw, float partialTick) {
    if (entity instanceof IBossDisplayData) {
        BossStatus.setBossStatus((IBossDisplayData) entity, true);
    }
    super.doRender(entity, dx, dy, dz, yaw, partialTick);
    if (model.atPeak) {
        renderSpell(entity, dx, dy, dz, yaw, partialTick);
    }
}
项目:RuneCraftery    文件:RenderWither.java   
public void func_82418_a(EntityWither p_82418_1_, double p_82418_2_, double p_82418_4_, double p_82418_6_, float p_82418_8_, float p_82418_9_) {
   BossStatus.func_82824_a(p_82418_1_, true);
   int var10 = ((ModelWither)this.field_77045_g).func_82903_a();
   if(var10 != this.field_82419_a) {
      this.field_82419_a = var10;
      this.field_77045_g = new ModelWither();
   }

   super.func_77031_a(p_82418_1_, p_82418_2_, p_82418_4_, p_82418_6_, p_82418_8_, p_82418_9_);
}
项目:RuneCraftery    文件:RenderWither.java   
public void func_82418_a(EntityWither par1EntityWither, double par2, double par4, double par6, float par8, float par9)
{
    BossStatus.setBossStatus(par1EntityWither, true);
    int i = ((ModelWither)this.mainModel).func_82903_a();

    if (i != this.field_82419_a)
    {
        this.field_82419_a = i;
        this.mainModel = new ModelWither();
    }

    super.doRenderLiving(par1EntityWither, par2, par4, par6, par8, par9);
}
项目:RuneCraftery    文件:GuiIngame.java   
/**
 * Renders dragon's (boss) health on the HUD
 */
protected void renderBossHealth()
{
    if (BossStatus.bossName != null && BossStatus.statusBarLength > 0)
    {
        --BossStatus.statusBarLength;
        FontRenderer fontrenderer = this.mc.fontRenderer;
        ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
        int i = scaledresolution.getScaledWidth();
        short short1 = 182;
        int j = i / 2 - short1 / 2;
        int k = (int)(BossStatus.healthScale * (float)(short1 + 1));
        byte b0 = 12;
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);

        if (k > 0)
        {
            this.drawTexturedModalRect(j, b0, 0, 79, k, 5);
        }

        String s = BossStatus.bossName;
        fontrenderer.drawStringWithShadow(s, i / 2 - fontrenderer.getStringWidth(s) / 2, b0 - 10, 16777215);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(icons);
    }
}
项目:BetterNutritionMod    文件:RenderWither.java   
public void func_82418_a(EntityWither par1EntityWither, double par2, double par4, double par6, float par8, float par9)
{
    BossStatus.setBossStatus(par1EntityWither, true);
    int i = ((ModelWither)this.mainModel).func_82903_a();

    if (i != this.field_82419_a)
    {
        this.field_82419_a = i;
        this.mainModel = new ModelWither();
    }

    super.doRenderLiving(par1EntityWither, par2, par4, par6, par8, par9);
}
项目:BetterNutritionMod    文件:GuiIngame.java   
/**
 * Renders dragon's (boss) health on the HUD
 */
protected void renderBossHealth()
{
    if (BossStatus.bossName != null && BossStatus.statusBarLength > 0)
    {
        --BossStatus.statusBarLength;
        FontRenderer fontrenderer = this.mc.fontRenderer;
        ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
        int i = scaledresolution.getScaledWidth();
        short short1 = 182;
        int j = i / 2 - short1 / 2;
        int k = (int)(BossStatus.healthScale * (float)(short1 + 1));
        byte b0 = 12;
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);

        if (k > 0)
        {
            this.drawTexturedModalRect(j, b0, 0, 79, k, 5);
        }

        String s = BossStatus.bossName;
        fontrenderer.drawStringWithShadow(s, i / 2 - fontrenderer.getStringWidth(s) / 2, b0 - 10, 16777215);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.getTextureManager().bindTexture(icons);
    }
}
项目:HotbarPlus    文件:HBPGui.java   
@Override
protected void renderBossHealth() {
    if (pre(BOSSHEALTH)) return;
    mc.mcProfiler.startSection("bossHealth");
    //The following 'if' statement was copied directly from GuiIngame
    if (BossStatus.bossName != null && BossStatus.statusBarLength > 0) {
        --BossStatus.statusBarLength;
        FontRenderer fontrenderer = this.mc.fontRenderer;
        ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
        int i = scaledresolution.getScaledWidth();
        short short1 = 182;
        int j = i / 2 - short1 / 2;
        int k = (int)(BossStatus.healthScale * (float)(short1 + 1));
        byte b0 = 12;
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        this.drawTexturedModalRect(j, b0, 0, 74, short1, 5);

        if (k > 0) {
            this.drawTexturedModalRect(j, b0, 0, 79, k, 5);
        }

        String s = BossStatus.bossName;
        fontrenderer.drawStringWithShadow(s, i / 2 - fontrenderer.getStringWidth(s) / 2, b0 - 10, 16777215);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        this.mc.func_110434_K().func_110577_a(field_110324_m);
    }
    mc.mcProfiler.endSection();
    post(BOSSHEALTH);
}
项目:AdvancedHUD    文件:HudItemBossBar.java   
@Override
public void render(float paramFloat) {
    Minecraft mc = Minecraft.getMinecraft();
    RenderAssist.bindTexture("textures/gui/icons.png");
    if (BossStatus.bossName != null && BossStatus.statusBarTime > 0 || mc.currentScreen instanceof GuiAdvancedHUDConfiguration || mc.currentScreen instanceof GuiScreenReposition) {
        if (BossStatus.bossName != null) {
            --BossStatus.statusBarTime;
        }
        FontRenderer fontrenderer = Minecraft.getMinecraft().fontRenderer;

        short short1 = 182;
        int j = posX;
        int k = (int) (BossStatus.healthScale * (short1 + 1));
        int b0 = posY + 11;
        RenderAssist.drawTexturedModalRect(j, b0, 0, 74, short1, 5);
        RenderAssist.drawTexturedModalRect(j, b0, 0, 74, short1, 5);

        if (BossStatus.bossName == null) {
            k = 182;
        }
        if (k > 0) {
            RenderAssist.drawTexturedModalRect(j, b0, 0, 79, k, 5);
        }

        String s = BossStatus.bossName != null ? BossStatus.bossName : "AdvancedHUD Config";
        fontrenderer.drawStringWithShadow(s, posX + 91 - fontrenderer.getStringWidth(s) / 2, b0 - 10, 16777215);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        RenderAssist.bindTexture(Gui.icons);
    }
}
项目:DecompiledMinecraft    文件:EntityRenderer.java   
/**
 * Updates the entity renderer
 */
public void updateRenderer()
{
    if (OpenGlHelper.shadersSupported && ShaderLinkHelper.getStaticShaderLinkHelper() == null)
    {
        ShaderLinkHelper.setNewStaticShaderLinkHelper();
    }

    this.updateFovModifierHand();
    this.updateTorchFlicker();
    this.fogColor2 = this.fogColor1;
    this.thirdPersonDistanceTemp = this.thirdPersonDistance;

    if (this.mc.gameSettings.smoothCamera)
    {
        float f = this.mc.gameSettings.mouseSensitivity * 0.6F + 0.2F;
        float f1 = f * f * f * 8.0F;
        this.smoothCamFilterX = this.mouseFilterXAxis.smooth(this.smoothCamYaw, 0.05F * f1);
        this.smoothCamFilterY = this.mouseFilterYAxis.smooth(this.smoothCamPitch, 0.05F * f1);
        this.smoothCamPartialTicks = 0.0F;
        this.smoothCamYaw = 0.0F;
        this.smoothCamPitch = 0.0F;
    }
    else
    {
        this.smoothCamFilterX = 0.0F;
        this.smoothCamFilterY = 0.0F;
        this.mouseFilterXAxis.reset();
        this.mouseFilterYAxis.reset();
    }

    if (this.mc.getRenderViewEntity() == null)
    {
        this.mc.setRenderViewEntity(this.mc.thePlayer);
    }

    float f3 = this.mc.theWorld.getLightBrightness(new BlockPos(this.mc.getRenderViewEntity()));
    float f4 = (float)this.mc.gameSettings.renderDistanceChunks / 32.0F;
    float f2 = f3 * (1.0F - f4) + f4;
    this.fogColor1 += (f2 - this.fogColor1) * 0.1F;
    ++this.rendererUpdateCount;
    this.itemRenderer.updateEquippedItem();
    this.addRainParticles();
    this.bossColorModifierPrev = this.bossColorModifier;

    if (BossStatus.hasColorModifier)
    {
        this.bossColorModifier += 0.05F;

        if (this.bossColorModifier > 1.0F)
        {
            this.bossColorModifier = 1.0F;
        }

        BossStatus.hasColorModifier = false;
    }
    else if (this.bossColorModifier > 0.0F)
    {
        this.bossColorModifier -= 0.0125F;
    }
}
项目:DecompiledMinecraft    文件:Minecraft.java   
public MusicTicker.MusicType getAmbientMusicType()
{
    return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell ? MusicTicker.MusicType.NETHER : (this.thePlayer.worldObj.provider instanceof WorldProviderEnd ? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS : MusicTicker.MusicType.END) : (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying ? MusicTicker.MusicType.CREATIVE : MusicTicker.MusicType.GAME))) : MusicTicker.MusicType.MENU;
}
项目:BaseClient    文件:EntityRenderer.java   
/**
 * Updates the entity renderer
 */
public void updateRenderer()
{
    if (OpenGlHelper.shadersSupported && ShaderLinkHelper.getStaticShaderLinkHelper() == null)
    {
        ShaderLinkHelper.setNewStaticShaderLinkHelper();
    }

    this.updateFovModifierHand();
    this.updateTorchFlicker();
    this.fogColor2 = this.fogColor1;
    this.thirdPersonDistanceTemp = this.thirdPersonDistance;

    if (this.mc.gameSettings.smoothCamera)
    {
        float f = this.mc.gameSettings.mouseSensitivity * 0.6F + 0.2F;
        float f1 = f * f * f * 8.0F;
        this.smoothCamFilterX = this.mouseFilterXAxis.smooth(this.smoothCamYaw, 0.05F * f1);
        this.smoothCamFilterY = this.mouseFilterYAxis.smooth(this.smoothCamPitch, 0.05F * f1);
        this.smoothCamPartialTicks = 0.0F;
        this.smoothCamYaw = 0.0F;
        this.smoothCamPitch = 0.0F;
    }
    else
    {
        this.smoothCamFilterX = 0.0F;
        this.smoothCamFilterY = 0.0F;
        this.mouseFilterXAxis.reset();
        this.mouseFilterYAxis.reset();
    }

    if (this.mc.getRenderViewEntity() == null)
    {
        this.mc.setRenderViewEntity(this.mc.thePlayer);
    }

    Entity entity = this.mc.getRenderViewEntity();
    double d0 = entity.posX;
    double d1 = entity.posY + (double)entity.getEyeHeight();
    double d2 = entity.posZ;
    float f3 = this.mc.theWorld.getLightBrightness(new BlockPos(d0, d1, d2));
    float f4 = (float)this.mc.gameSettings.renderDistanceChunks / 16.0F;
    f4 = MathHelper.clamp_float(f4, 0.0F, 1.0F);
    float f2 = f3 * (1.0F - f4) + f4;
    this.fogColor1 += (f2 - this.fogColor1) * 0.1F;
    ++this.rendererUpdateCount;
    this.itemRenderer.updateEquippedItem();
    this.addRainParticles();
    this.bossColorModifierPrev = this.bossColorModifier;

    if (BossStatus.hasColorModifier)
    {
        this.bossColorModifier += 0.05F;

        if (this.bossColorModifier > 1.0F)
        {
            this.bossColorModifier = 1.0F;
        }

        BossStatus.hasColorModifier = false;
    }
    else if (this.bossColorModifier > 0.0F)
    {
        this.bossColorModifier -= 0.0125F;
    }
}
项目:BaseClient    文件:Minecraft.java   
public MusicTicker.MusicType getAmbientMusicType()
{
    return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell ? MusicTicker.MusicType.NETHER : (this.thePlayer.worldObj.provider instanceof WorldProviderEnd ? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS : MusicTicker.MusicType.END) : (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying ? MusicTicker.MusicType.CREATIVE : MusicTicker.MusicType.GAME))) : MusicTicker.MusicType.MENU;
}
项目:BaseClient    文件:EntityRenderer.java   
/**
 * Updates the entity renderer
 */
public void updateRenderer() {
    if (OpenGlHelper.shadersSupported && ShaderLinkHelper.getStaticShaderLinkHelper() == null) {
        ShaderLinkHelper.setNewStaticShaderLinkHelper();
    }

    this.updateFovModifierHand();
    this.updateTorchFlicker();
    this.fogColor2 = this.fogColor1;
    this.thirdPersonDistanceTemp = this.thirdPersonDistance;

    if (this.mc.gameSettings.smoothCamera) {
        float f = this.mc.gameSettings.mouseSensitivity * 0.6F + 0.2F;
        float f1 = f * f * f * 8.0F;
        this.smoothCamFilterX = this.mouseFilterXAxis.smooth(this.smoothCamYaw, 0.05F * f1);
        this.smoothCamFilterY = this.mouseFilterYAxis.smooth(this.smoothCamPitch, 0.05F * f1);
        this.smoothCamPartialTicks = 0.0F;
        this.smoothCamYaw = 0.0F;
        this.smoothCamPitch = 0.0F;
    } else {
        this.smoothCamFilterX = 0.0F;
        this.smoothCamFilterY = 0.0F;
        this.mouseFilterXAxis.reset();
        this.mouseFilterYAxis.reset();
    }

    if (this.mc.getRenderViewEntity() == null) {
        this.mc.setRenderViewEntity(this.mc.thePlayer);
    }

    float f3 = this.mc.theWorld.getLightBrightness(new BlockPos(this.mc.getRenderViewEntity()));
    float f4 = (float) this.mc.gameSettings.renderDistanceChunks / 32.0F;
    float f2 = f3 * (1.0F - f4) + f4;
    this.fogColor1 += (f2 - this.fogColor1) * 0.1F;
    ++this.rendererUpdateCount;
    this.itemRenderer.updateEquippedItem();
    this.addRainParticles();
    this.bossColorModifierPrev = this.bossColorModifier;

    if (BossStatus.hasColorModifier) {
        this.bossColorModifier += 0.05F;

        if (this.bossColorModifier > 1.0F) {
            this.bossColorModifier = 1.0F;
        }

        BossStatus.hasColorModifier = false;
    } else if (this.bossColorModifier > 0.0F) {
        this.bossColorModifier -= 0.0125F;
    }
}
项目:4Space-5    文件:SpawnerRenderer.java   
public void renderInventoryItem(RenderBlocks render, ItemStack item)
{
    int meta = item.getItemDamage();

    if(meta == 0)
        meta = ItemMobSpawner.idPig;

    String bossName = BossStatus.bossName;
    int bossTimeout = BossStatus.statusBarTime;
    try
    {
        World world = NEIClientUtils.mc().theWorld;
        ItemMobSpawner.loadSpawners(world);
        TextureUtils.bindAtlas(0);
        render.renderBlockAsItem(Blocks.mob_spawner, 0, 1F);
        GL11.glPushMatrix();

        Entity entity = ItemMobSpawner.getEntity(meta);
        entity.setWorld(world);
        float f1 = 0.4375F;
        if(entity.getShadowSize() > 1.5)
            f1 = 0.1F;
        GL11.glRotatef((float) (ClientUtils.getRenderTime()*10), 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(-20F, 1.0F, 0.0F, 0.0F);
        GL11.glTranslatef(0.0F, -0.4F, 0.0F);
        GL11.glScalef(f1, f1, f1);
        entity.setLocationAndAngles(0, 0, 0, 0.0F, 0.0F);
        RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 0);
        GL11.glPopMatrix();

        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
    }
    catch(Exception e)
    {
        if(Tessellator.instance.isDrawing)
            Tessellator.instance.draw();
    }
    BossStatus.bossName = bossName;
    BossStatus.statusBarTime = bossTimeout;
}
项目:MidgarCrusade    文件:RenderBossOrc.java   
@Override
public void doRender(EntityLiving e, double x, double y, double z, float rotationYaw, float rotationPitch)
{
    BossStatus.setBossStatus((EntityBossOrc) e, true);
    super.doRender(e, x, y, z, rotationYaw, rotationPitch);
}
项目:MidgarCrusade    文件:RenderArkavon.java   
@Override
public void doRender(EntityLiving e, double x, double y, double z, float rotationYaw, float rotationPitch)
{
    BossStatus.setBossStatus((EntityArkavon) e, true);
    super.doRender(e, x, y, z, rotationYaw, rotationPitch);
}