本文整理汇总了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);
}
}
示例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);
}
}
示例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;
}
}
示例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);
}
}
示例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;
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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;
}
示例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;
}