當前位置: 首頁>>代碼示例>>Java>>正文


Java ItemPotion.func_94589_d方法代碼示例

本文整理匯總了Java中net.minecraft.item.ItemPotion.func_94589_d方法的典型用法代碼示例。如果您正苦於以下問題:Java ItemPotion.func_94589_d方法的具體用法?Java ItemPotion.func_94589_d怎麽用?Java ItemPotion.func_94589_d使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.item.ItemPotion的用法示例。


在下文中一共展示了ItemPotion.func_94589_d方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: func_76986_a

import net.minecraft.item.ItemPotion; //導入方法依賴的package包/類
public void func_76986_a(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
   Icon var10 = this.field_94151_a.func_77617_a(this.field_94150_f);
   if(var10 != null) {
      GL11.glPushMatrix();
      GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
      GL11.glEnable('\u803a');
      GL11.glScalef(0.5F, 0.5F, 0.5F);
      this.func_110777_b(p_76986_1_);
      Tessellator var11 = Tessellator.field_78398_a;
      if(var10 == ItemPotion.func_94589_d("bottle_splash")) {
         int var12 = PotionHelper.func_77915_a(((EntityPotion)p_76986_1_).func_70196_i(), false);
         float var13 = (float)(var12 >> 16 & 255) / 255.0F;
         float var14 = (float)(var12 >> 8 & 255) / 255.0F;
         float var15 = (float)(var12 & 255) / 255.0F;
         GL11.glColor3f(var13, var14, var15);
         GL11.glPushMatrix();
         this.func_77026_a(var11, ItemPotion.func_94589_d("overlay"));
         GL11.glPopMatrix();
         GL11.glColor3f(1.0F, 1.0F, 1.0F);
      }

      this.func_77026_a(var11, var10);
      GL11.glDisable('\u803a');
      GL11.glPopMatrix();
   }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:27,代碼來源:RenderSnowball.java

示例2: doRender

import net.minecraft.item.ItemPotion; //導入方法依賴的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(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
    Icon icon = this.field_94151_a.getIconFromDamage(this.field_94150_f);

    if (icon != null)
    {
        GL11.glPushMatrix();
        GL11.glTranslatef((float)par2, (float)par4, (float)par6);
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glScalef(0.5F, 0.5F, 0.5F);
        this.bindEntityTexture(par1Entity);
        Tessellator tessellator = Tessellator.instance;

        if (icon == ItemPotion.func_94589_d("bottle_splash"))
        {
            int i = PotionHelper.func_77915_a(((EntityPotion)par1Entity).getPotionDamage(), false);
            float f2 = (float)(i >> 16 & 255) / 255.0F;
            float f3 = (float)(i >> 8 & 255) / 255.0F;
            float f4 = (float)(i & 255) / 255.0F;
            GL11.glColor3f(f2, f3, f4);
            GL11.glPushMatrix();
            this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
            GL11.glPopMatrix();
            GL11.glColor3f(1.0F, 1.0F, 1.0F);
        }

        this.func_77026_a(tessellator, icon);
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glPopMatrix();
    }
}
 
開發者ID:marcus8448,項目名稱:IceMod,代碼行數:38,代碼來源:RenderHunkOIce.java

示例3: doRender

import net.minecraft.item.ItemPotion; //導入方法依賴的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 func_76986_a(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(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
    IIcon iicon = this.field_94151_a.getIconFromDamage(this.field_94150_f);

    if (iicon != null)
    {
        GL11.glPushMatrix();
        GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glScalef(0.5F, 0.5F, 0.5F);
        this.bindEntityTexture(p_76986_1_);
        Tessellator tessellator = Tessellator.instance;

        if (iicon == ItemPotion.func_94589_d("bottle_splash"))
        {
            int i = PotionHelper.func_77915_a(((EntityPotion)p_76986_1_).getPotionDamage(), false);
            float f2 = (float)(i >> 16 & 255) / 255.0F;
            float f3 = (float)(i >> 8 & 255) / 255.0F;
            float f4 = (float)(i & 255) / 255.0F;
            GL11.glColor3f(f2, f3, f4);
            GL11.glPushMatrix();
            this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
            GL11.glPopMatrix();
            GL11.glColor3f(1.0F, 1.0F, 1.0F);
        }

        this.func_77026_a(tessellator, iicon);
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glPopMatrix();
    }
}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:38,代碼來源:RenderGiantSnowBall.java

示例4: doRender

import net.minecraft.item.ItemPotion; //導入方法依賴的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(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
    IIcon var10 = this.field_94151_a.getIconFromDamage(this.field_94150_f);

    if (var10 != null)
    {
        GL11.glPushMatrix();
        GL11.glTranslatef((float)par2, (float)par4, (float)par6);
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glScalef(0.5F, 0.5F, 0.5F);
        this.bindEntityTexture(par1Entity);
        Tessellator var11 = Tessellator.instance;

        if (var10 == ItemPotion.func_94589_d("bottle_splash"))
        {
            int var12 = PotionHelper.func_77915_a(((EntityPotion)par1Entity).getPotionDamage(), false);
            float var13 = (float)(var12 >> 16 & 255) / 255.0F;
            float var14 = (float)(var12 >> 8 & 255) / 255.0F;
            float var15 = (float)(var12 & 255) / 255.0F;
            GL11.glColor3f(var13, var14, var15);
            GL11.glPushMatrix();
            this.func_77026_a(var11, ItemPotion.func_94589_d("overlay"));
            GL11.glPopMatrix();
            GL11.glColor3f(1.0F, 1.0F, 1.0F);
        }

        this.func_77026_a(var11, var10);
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glPopMatrix();
    }
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:38,代碼來源:RenderSnowball.java

示例5: doRender

import net.minecraft.item.ItemPotion; //導入方法依賴的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(Entity bomb, double x, double y, double z, float pitch, float yaw)
{
	Icon icon = null;
	if(bomb instanceof IBomb)
	{
		icon = ((IBomb)bomb).getIcon();
	}

    if (icon != null)
    {
        GL11.glPushMatrix();
        GL11.glTranslatef((float)x, (float)y, (float)z);
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glScalef(0.5F, 0.5F, 0.5F);
        this.bindTexture(TextureMap.locationItemsTexture);
        Tessellator tessellator = Tessellator.instance;

        if (icon == ItemPotion.func_94589_d("potion_splash"))
        {
            int i = PotionHelper.func_77915_a(((EntityPotion)bomb).getPotionDamage(), false);
            float f2 = (float)(i >> 16 & 255) / 255.0F;
            float f3 = (float)(i >> 8 & 255) / 255.0F;
            float f4 = (float)(i & 255) / 255.0F;
            GL11.glColor3f(f2, f3, f4);
            GL11.glPushMatrix();
            this.func_77026_a(tessellator, ItemPotion.func_94589_d("potion_contents"));
            GL11.glPopMatrix();
            GL11.glColor3f(1.0F, 1.0F, 1.0F);
        }

        this.func_77026_a(tessellator, icon);
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glPopMatrix();
    }
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:42,代碼來源:RenderBomb.java

示例6: doRender

import net.minecraft.item.ItemPotion; //導入方法依賴的package包/類
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
    IIcon iicon = this.field_94151_a.getIconFromDamage(this.field_94150_f);

    if (iicon != null)
    {
        GL11.glPushMatrix();
        GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glScalef(0.5F, 0.5F, 0.5F);
        this.bindEntityTexture(p_76986_1_);
        Tessellator tessellator = Tessellator.instance;

        if (iicon == ItemPotion.func_94589_d("bottle_splash"))
        {
            int i = PotionHelper.func_77915_a(((EntityPotion)p_76986_1_).getPotionDamage(), false);
            float f2 = (float)(i >> 16 & 255) / 255.0F;
            float f3 = (float)(i >> 8 & 255) / 255.0F;
            float f4 = (float)(i & 255) / 255.0F;
            GL11.glColor3f(f2, f3, f4);
            GL11.glPushMatrix();
            this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
            GL11.glPopMatrix();
            GL11.glColor3f(1.0F, 1.0F, 1.0F);
        }

        this.func_77026_a(tessellator, iicon);
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glPopMatrix();
    }
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:32,代碼來源:RenderSnowball.java

示例7: doRender

import net.minecraft.item.ItemPotion; //導入方法依賴的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(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
	Icon icon = this.field_94151_a.getIconFromDamage(this.field_94150_f);

	if (icon != null)
	{
		GL11.glPushMatrix();
		GL11.glTranslatef((float)par2, (float)par4, (float)par6);
		GL11.glEnable(GL12.GL_RESCALE_NORMAL);
		GL11.glScalef(0.5F, 0.5F, 0.5F);
		// this.func_110777_b(par1Entity); // worked in Forge 804, but no longer; use this:
		this.bindEntityTexture(par1Entity);
		Tessellator tessellator = Tessellator.instance;

		// You can remove this whole section if you want, it's just for Potions
		if (icon == ItemPotion.func_94589_d("bottle_splash"))
		{
			int i = PotionHelper.func_77915_a(((EntityPotion)par1Entity).getPotionDamage(), false);
			float f2 = (float)(i >> 16 & 255) / 255.0F;
			float f3 = (float)(i >> 8 & 255) / 255.0F;
			float f4 = (float)(i & 255) / 255.0F;
			GL11.glColor3f(f2, f3, f4);
			GL11.glPushMatrix();
			this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
			GL11.glPopMatrix();
			GL11.glColor3f(1.0F, 1.0F, 1.0F);
		}

		this.func_77026_a(tessellator, icon);
		GL11.glDisable(GL12.GL_RESCALE_NORMAL);
		GL11.glPopMatrix();
	}
}
 
開發者ID:Wehavecookies56,項目名稱:Kingdom-Keys,代碼行數:40,代碼來源:RenderSharpshooterShot.java

示例8: doRender

import net.minecraft.item.ItemPotion; //導入方法依賴的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(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
	IIcon icon = this.item.getIconFromDamage(this.metadata);
	
	if (icon != null)
	{
		GL11.glPushMatrix();
		GL11.glTranslatef((float) par2, (float) par4, (float) par6);
		GL11.glEnable(GL12.GL_RESCALE_NORMAL);
		GL11.glScalef(0.5F, 0.5F, 0.5F);
		this.bindEntityTexture(par1Entity);
		Tessellator tessellator = Tessellator.instance;
		
		if (icon == ItemPotion.func_94589_d("bottle_splash"))
		{
			int i = PotionHelper.func_77915_a(((EntityPotion) par1Entity).getPotionDamage(), false);
			float f2 = (float) (i >> 16 & 255) / 255.0F;
			float f3 = (float) (i >> 8 & 255) / 255.0F;
			float f4 = (float) (i & 255) / 255.0F;
			GL11.glColor3f(f2, f3, f4);
			GL11.glPushMatrix();
			this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
			GL11.glPopMatrix();
			GL11.glColor3f(1.0F, 1.0F, 1.0F);
		}
		
		this.func_77026_a(tessellator, icon);
		GL11.glDisable(GL12.GL_RESCALE_NORMAL);
		GL11.glPopMatrix();
	}
}
 
開發者ID:wuppy29,項目名稱:WuppyMods,代碼行數:35,代碼來源:RenderNetherEye.java

示例9: doRender

import net.minecraft.item.ItemPotion; //導入方法依賴的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(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
	IIcon icon = this.item.getIconFromDamage(this.metadata);

	if (icon != null)
	{
		GL11.glPushMatrix();
		GL11.glTranslatef((float) par2, (float) par4, (float) par6);
		GL11.glEnable(GL12.GL_RESCALE_NORMAL);
		GL11.glScalef(0.5F, 0.5F, 0.5F);
		this.bindEntityTexture(par1Entity);
		Tessellator tessellator = Tessellator.instance;

		if (icon == ItemPotion.func_94589_d("bottle_splash"))
		{
			int i = PotionHelper.func_77915_a(((EntityPotion) par1Entity).getPotionDamage(), false);
			float f2 = (float) (i >> 16 & 255) / 255.0F;
			float f3 = (float) (i >> 8 & 255) / 255.0F;
			float f4 = (float) (i & 255) / 255.0F;
			GL11.glColor3f(f2, f3, f4);
			GL11.glPushMatrix();
			this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
			GL11.glPopMatrix();
			GL11.glColor3f(1.0F, 1.0F, 1.0F);
		}

		this.func_77026_a(tessellator, icon);
		GL11.glDisable(GL12.GL_RESCALE_NORMAL);
		GL11.glPopMatrix();
	}
}
 
開發者ID:wuppy29,項目名稱:WuppyMods,代碼行數:35,代碼來源:RenderMagicalBottle.java

示例10: renderFrostShard

import net.minecraft.item.ItemPotion; //導入方法依賴的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 renderFrostShard(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
   {
IIcon icon = this.item.getIconFromDamage(this.itemDamage);

if (icon != null)
{
    GL11.glPushMatrix();
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glScalef(0.5F, 0.5F, 0.5F);
    this.bindEntityTexture(par1Entity);

    Tessellator tessellator = Tessellator.instance;

    if (icon == ItemPotion.func_94589_d("bottle_splash")){
	int i = PotionHelper.func_77915_a(((EntityPotion)par1Entity).getPotionDamage(), false);
	float f2 = (float)(i >> 16 & 255) / 255.0F;
	float f3 = (float)(i >> 8 & 255) / 255.0F;
	float f4 = (float)(i & 255) / 255.0F;
	GL11.glColor3f(f2, f3, f4);
	GL11.glPushMatrix();
	this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
	GL11.glPopMatrix();
	GL11.glColor3f(1.0F, 1.0F, 1.0F);
    }

    this.func_77026_a(tessellator, icon);
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
}
   }
 
開發者ID:OwnAgePau,項目名稱:Soul-Forest,代碼行數:38,代碼來源:RenderFrostShard.java

示例11: doRenderTR

import net.minecraft.item.ItemPotion; //導入方法依賴的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 doRenderTR(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
	//IIcon icon = ItemGenerics.Properties.DuckEgg.getIcon(); 
	//this.field_94151_a.getIconFromDamage(this.field_94150_f);
		
		IIcon icon;
        if (ItemList.genericCraftingItems.isPresent()) {
            icon = ItemGenerics.Properties.ThrowingRock.getIcon();
        } else {
            icon = Items.fire_charge.getIconFromDamage(0);
        }

	if (icon != null)
	{
		GL11.glPushMatrix();
		GL11.glTranslatef((float)par2, (float)par4, (float)par6);
		GL11.glEnable(GL12.GL_RESCALE_NORMAL);
		GL11.glScalef(0.5F, 0.5F, 0.5F);
		// this.func_110777_b(par1Entity); // worked in Forge 804, but no longer; use this:
		this.bindEntityTexture(par1Entity);
		Tessellator tessellator = Tessellator.instance;

		// You can remove this whole section if you want, it's just for Potions
		if (icon == ItemPotion.func_94589_d("bottle_splash"))
			{
			int i = PotionHelper.func_77915_a(((EntityPotion)par1Entity).getPotionDamage(), false);
			float f2 = (float)(i >> 16 & 255) / 255.0F;
			float f3 = (float)(i >> 8 & 255) / 255.0F;
			float f4 = (float)(i & 255) / 255.0F;
			GL11.glColor3f(f2, f3, f4);
			GL11.glPushMatrix();
			this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
			GL11.glPopMatrix();
			GL11.glColor3f(1.0F, 1.0F, 1.0F);
			}

		this.func_77026_a(tessellator, icon);
		GL11.glDisable(GL12.GL_RESCALE_NORMAL);
		GL11.glPopMatrix();
	}
}
 
開發者ID:soultek101,項目名稱:projectzulu1.7.10,代碼行數:48,代碼來源:RenderThrowingRock.java

示例12: doRenderEgg

import net.minecraft.item.ItemPotion; //導入方法依賴的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 doRenderEgg(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
	//IIcon icon = ItemGenerics.Properties.DuckEgg.getIcon(); 
	//this.field_94151_a.getIconFromDamage(this.field_94150_f);
		
		IIcon icon;
        if (ItemList.genericCraftingItems.isPresent()) {
            icon = ItemGenerics.Properties.OstrichEgg.getIcon();
        } else {
            icon = Items.fire_charge.getIconFromDamage(0);
        }

	if (icon != null)
	{
		GL11.glPushMatrix();
		GL11.glTranslatef((float)par2, (float)par4, (float)par6);
		GL11.glEnable(GL12.GL_RESCALE_NORMAL);
		GL11.glScalef(0.5F, 0.5F, 0.5F);
		// this.func_110777_b(par1Entity); // worked in Forge 804, but no longer; use this:
		this.bindEntityTexture(par1Entity);
		Tessellator tessellator = Tessellator.instance;

		// You can remove this whole section if you want, it's just for Potions
		if (icon == ItemPotion.func_94589_d("bottle_splash"))
			{
			int i = PotionHelper.func_77915_a(((EntityPotion)par1Entity).getPotionDamage(), false);
			float f2 = (float)(i >> 16 & 255) / 255.0F;
			float f3 = (float)(i >> 8 & 255) / 255.0F;
			float f4 = (float)(i & 255) / 255.0F;
			GL11.glColor3f(f2, f3, f4);
			GL11.glPushMatrix();
			this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
			GL11.glPopMatrix();
			GL11.glColor3f(1.0F, 1.0F, 1.0F);
			}

		this.func_77026_a(tessellator, icon);
		GL11.glDisable(GL12.GL_RESCALE_NORMAL);
		GL11.glPopMatrix();
	}
}
 
開發者ID:soultek101,項目名稱:projectzulu1.7.10,代碼行數:48,代碼來源:RenderOstrichEgg.java

示例13: doRenderDuckEgg

import net.minecraft.item.ItemPotion; //導入方法依賴的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 doRenderDuckEgg(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
	//IIcon icon = ItemGenerics.Properties.DuckEgg.getIcon(); 
	//this.field_94151_a.getIconFromDamage(this.field_94150_f);
		
		IIcon icon;
        if (ItemList.genericCraftingItems.isPresent()) {
            icon = ItemGenerics.Properties.DuckEgg.getIcon();
        } else {
            icon = Items.fire_charge.getIconFromDamage(0);
        }

	if (icon != null)
	{
		GL11.glPushMatrix();
		GL11.glTranslatef((float)par2, (float)par4, (float)par6);
		GL11.glEnable(GL12.GL_RESCALE_NORMAL);
		GL11.glScalef(0.5F, 0.5F, 0.5F);
		// this.func_110777_b(par1Entity); // worked in Forge 804, but no longer; use this:
		this.bindEntityTexture(par1Entity);
		Tessellator tessellator = Tessellator.instance;

		// You can remove this whole section if you want, it's just for Potions
		if (icon == ItemPotion.func_94589_d("bottle_splash"))
			{
			int i = PotionHelper.func_77915_a(((EntityPotion)par1Entity).getPotionDamage(), false);
			float f2 = (float)(i >> 16 & 255) / 255.0F;
			float f3 = (float)(i >> 8 & 255) / 255.0F;
			float f4 = (float)(i & 255) / 255.0F;
			GL11.glColor3f(f2, f3, f4);
			GL11.glPushMatrix();
			this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
			GL11.glPopMatrix();
			GL11.glColor3f(1.0F, 1.0F, 1.0F);
			}

		this.func_77026_a(tessellator, icon);
		GL11.glDisable(GL12.GL_RESCALE_NORMAL);
		GL11.glPopMatrix();
	}
}
 
開發者ID:soultek101,項目名稱:projectzulu1.7.10,代碼行數:48,代碼來源:RenderDuckEgg.java


注:本文中的net.minecraft.item.ItemPotion.func_94589_d方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。