本文整理汇总了Java中net.minecraft.entity.boss.BossStatus类的典型用法代码示例。如果您正苦于以下问题:Java BossStatus类的具体用法?Java BossStatus怎么用?Java BossStatus使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BossStatus类属于net.minecraft.entity.boss包,在下文中一共展示了BossStatus类的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: func_73828_d
import net.minecraft.entity.boss.BossStatus; //导入依赖的package包/类
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);
}
}
示例6: 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;
}
示例7: 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);
}
示例8: shouldSlimeRenderPass
import net.minecraft.entity.boss.BossStatus; //导入依赖的package包/类
/**
* 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;
}
}
示例9: doRender
import net.minecraft.entity.boss.BossStatus; //导入依赖的package包/类
/**
* 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);
}
}
示例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 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);
}
}
示例11: 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);
}
}
示例12: 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;
}
示例13: doRender
import net.minecraft.entity.boss.BossStatus; //导入依赖的package包/类
@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);
}
示例14: doRender
import net.minecraft.entity.boss.BossStatus; //导入依赖的package包/类
/**
* 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);
}
示例15: 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);
}
}