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


Java BossStatus.bossName方法代码示例

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


在下文中一共展示了BossStatus.bossName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: yPos

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

示例4: 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

示例5: 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

示例6: 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

示例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();
        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

示例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 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

示例9: getAmbientMusicType

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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: getAmbientMusicType

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

示例15: renderInventoryItem

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


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