当前位置: 首页>>代码示例>>Java>>正文


Java BossStatus.healthScale方法代码示例

本文整理汇总了Java中net.minecraft.entity.boss.BossStatus.healthScale方法的典型用法代码示例。如果您正苦于以下问题:Java BossStatus.healthScale方法的具体用法?Java BossStatus.healthScale怎么用?Java BossStatus.healthScale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.entity.boss.BossStatus的用法示例。


在下文中一共展示了BossStatus.healthScale方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: renderBossHealth

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
/**
 * 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);
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:28,代码来源:GuiIngame.java

示例2: renderBossHealth

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
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);
	}
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:24,代码来源:GuiIngame.java

示例3: renderBossHealth

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
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);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:27,代码来源:GuiIngame.java

示例4: forceRender

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
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;
}
 
开发者ID:iChun,项目名称:Morph,代码行数:25,代码来源:ModelInfo.java

示例5: render

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
@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);
}
 
开发者ID:Aurilux,项目名称:HudPlus,代码行数:23,代码来源:HPBossHealth.java

示例6: renderBossHealth

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
/**
 * 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);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:30,代码来源:GuiIngame.java

示例7: renderBossHealth

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
/**
 * 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);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:37,代码来源:GuiIngame.java

示例8: renderBossHealth

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
/**
 * 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);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:30,代码来源:GuiIngame.java

示例9: renderBossHealth

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
/**
 * 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);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:30,代码来源:GuiIngame.java

示例10: renderBossHealth

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
@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);
}
 
开发者ID:Aurilux,项目名称:HotbarPlus,代码行数:30,代码来源:HBPGui.java

示例11: render

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
@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);
    }
}
 
开发者ID:maxpowa,项目名称:AdvancedHUD,代码行数:31,代码来源:HudItemBossBar.java

示例12: renderBossHealth

import net.minecraft.entity.boss.BossStatus; //导入方法依赖的package包/类
@Override
@SubscribeEvent(priority = EventPriority.LOWEST, receiveCanceled=true)
public void renderBossHealth() {
   if (replaceEvent(BOSSHEALTH)) return;

    mc.mcProfiler.startSection("bossHealth");
    if (BossStatus.bossName != null && BossStatus.statusBarTime > 0)
    {
        GLCore.glAlphaTest(true);
        GLCore.glBlend(true);
        --BossStatus.statusBarTime;

        double scale = 1.00;
        GLCore.glColor(1.0F, 1.0F, 1.0F, 1.0F);

        GLCore.glBindTexture(StringNames.gui);

        final int healthBarWidth = 234;
        final double healthWidth = 216 * scale;
        double j = width / 2 - healthBarWidth / 2 * scale;
        byte b0 = 15;
        final double healthValue = BossStatus.healthScale * healthWidth;

        //bar background
        GLCore.glTexturedRect((int)j, b0, zLevel, (int)(healthBarWidth * scale), (int)(15 * scale), 21, 0, healthBarWidth, 15);
        GLCore.glTexturedRect((int)j, b0, zLevel, (int)(healthBarWidth * scale), (int)(5 * scale), 21, 0, healthBarWidth, 5);

        final int healthHeight = 9;
        HealthStep.getStep(mc, BossStatus.healthScale, time).glColor();

        //render
        int h = healthHeight;
        //GL11.glPushMatrix();
        //GL11.glScalef((float)scale, (float)scale, (float)scale);
        for (int i = 0; i < healthValue ; i++) {
            GLCore.glTexturedRect((int)j + 1 + i, b0 + (int)(3 * scale), zLevel, 1, h * scale, (healthHeight - h), 15, (int)(1 * scale), h);

            if (((i >= 105 * scale) && (i <= 110 * scale)) || (i >= healthValue - h)) {
                h--;

                if (h <= 0) break;
            }
        }
        //GL11.glPopMatrix();

        //name
        String s = BossStatus.bossName;
        fontRenderer.drawStringWithShadow(s, width / 2 - fontRenderer.getStringWidth(s) / 2, b0 - 10, 16777215);
        GLCore.glColor(1.0F, 1.0F, 1.0F, 1.0F);

        GLCore.glAlphaTest(false);
        GLCore.glBlend(false);

    }
    mc.mcProfiler.endSection();
    post(BOSSHEALTH);

}
 
开发者ID:Tencao,项目名称:SAO-UI---1.8.8,代码行数:59,代码来源:IngameGUI.java


注:本文中的net.minecraft.entity.boss.BossStatus.healthScale方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。