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


Java Icon类代码示例

本文整理汇总了Java中net.minecraft.util.Icon的典型用法代码示例。如果您正苦于以下问题:Java Icon类的具体用法?Java Icon怎么用?Java Icon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: func_77026_a

import net.minecraft.util.Icon; //导入依赖的package包/类
private void func_77026_a(Tessellator par1Tessellator, Icon par2Icon)
{
    float f = par2Icon.getMinU();
    float f1 = par2Icon.getMaxU();
    float f2 = par2Icon.getMinV();
    float f3 = par2Icon.getMaxV();
    float f4 = 1.0F;
    float f5 = 0.5F;
    float f6 = 0.25F;
    GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    par1Tessellator.startDrawingQuads();
    par1Tessellator.setNormal(0.0F, 1.0F, 0.0F);
    par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3);
    par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3);
    par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2);
    par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2);
    par1Tessellator.draw();
}
 
开发者ID:marcus8448,项目名称:IceMod,代码行数:20,代码来源:RenderHunkOIce.java

示例2: getIcon

import net.minecraft.util.Icon; //导入依赖的package包/类
public Icon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
{
                         if(player.getItemInUse() == null) return this.itemIcon;
                         int Pulling = stack.getMaxItemUseDuration() - useRemaining;
                         if (Pulling >= 50)
                         {
                                         return Texture[3];
                         }
                         else if (Pulling > 34)
                         {
                                         return Texture[2];
                         }
                         else if (Pulling > 18)
                         {
                                         return Texture[1];
                         }
                         return Texture[0];
                         }
 
开发者ID:MinecraftModArchive,项目名称:Runes-And-Silver,代码行数:19,代码来源:AirStaff.java

示例3: registerIcons

import net.minecraft.util.Icon; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister reg)
{
	if(isVChain())
	{
		ironChain = new Icon[4];
		
		ironChain[0] = reg.registerIcon("MineFantasy:Apparel/ironChainHelmet");
		ironChain[1] = reg.registerIcon("MineFantasy:Apparel/ironChainChest");
		ironChain[2] = reg.registerIcon("MineFantasy:Apparel/ironChainLegs");
		ironChain[3] = reg.registerIcon("MineFantasy:Apparel/ironChainBoots");
	}
	else
		super.registerIcons(reg);
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:17,代码来源:ItemArmourMFOld.java

示例4: func_77026_a

import net.minecraft.util.Icon; //导入依赖的package包/类
private void func_77026_a(Tessellator p_77026_1_, Icon p_77026_2_) {
   float var3 = p_77026_2_.func_94209_e();
   float var4 = p_77026_2_.func_94212_f();
   float var5 = p_77026_2_.func_94206_g();
   float var6 = p_77026_2_.func_94210_h();
   float var7 = 1.0F;
   float var8 = 0.5F;
   float var9 = 0.25F;
   GL11.glRotatef(180.0F - this.field_76990_c.field_78735_i, 0.0F, 1.0F, 0.0F);
   GL11.glRotatef(-this.field_76990_c.field_78732_j, 1.0F, 0.0F, 0.0F);
   p_77026_1_.func_78382_b();
   p_77026_1_.func_78375_b(0.0F, 1.0F, 0.0F);
   p_77026_1_.func_78374_a((double)(0.0F - var8), (double)(0.0F - var9), 0.0D, (double)var3, (double)var6);
   p_77026_1_.func_78374_a((double)(var7 - var8), (double)(0.0F - var9), 0.0D, (double)var4, (double)var6);
   p_77026_1_.func_78374_a((double)(var7 - var8), (double)(var7 - var9), 0.0D, (double)var4, (double)var5);
   p_77026_1_.func_78374_a((double)(0.0F - var8), (double)(var7 - var9), 0.0D, (double)var3, (double)var5);
   p_77026_1_.func_78381_a();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:19,代码来源:RenderSnowball.java

示例5: doRender

import net.minecraft.util.Icon; //导入依赖的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

示例6: getIconFromDamageForRenderPass

import net.minecraft.util.Icon; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public Icon getIconFromDamageForRenderPass(int damage, int pass)
{
	if ( pass != 0 )
	{
		return getIconFromDamage( damage );
	}
	
	return Item.potion.getIconFromDamageForRenderPass( damage, pass );
}
 
开发者ID:spacechase0,项目名称:OldMods,代码行数:12,代码来源:CondensedPotionItem.java

示例7: getIcon

import net.minecraft.util.Icon; //导入依赖的package包/类
@SideOnly(Side.CLIENT)

    /**
     * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
     */
    public Icon getIcon(int par1, int par2)
    {
        return this.iconArray[0];
    }
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:10,代码来源:BlockFire.java

示例8: getIcon

import net.minecraft.util.Icon; //导入依赖的package包/类
@SideOnly(Side.CLIENT)

    /**
     * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
     */
    public Icon getIcon(int par1, int par2)
    {
        if (par2 >= this.iconArray.length)
        {
            par2 = 0;
        }

        return this.iconArray[par2];
    }
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:15,代码来源:BlockTallGrass.java

示例9: func_94332_a

import net.minecraft.util.Icon; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public void func_94332_a(IconRegister p_94332_1_) {
   this.field_94363_a = new Icon[8];

   for(int var2 = 0; var2 < this.field_94363_a.length; ++var2) {
      this.field_94363_a[var2] = p_94332_1_.func_94245_a(this.func_111023_E() + "_stage_" + var2);
   }

}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:10,代码来源:BlockCrops.java

示例10: func_130015_b

import net.minecraft.util.Icon; //导入依赖的package包/类
protected void func_130015_b(float p_130015_1_, int p_130015_2_, int p_130015_3_) {
   if(p_130015_1_ < 1.0F) {
      p_130015_1_ *= p_130015_1_;
      p_130015_1_ *= p_130015_1_;
      p_130015_1_ = p_130015_1_ * 0.8F + 0.2F;
   }

   GL11.glDisable(3008);
   GL11.glDisable(2929);
   GL11.glDepthMask(false);
   GL11.glBlendFunc(770, 771);
   GL11.glColor4f(1.0F, 1.0F, 1.0F, p_130015_1_);
   Icon var4 = Block.field_72015_be.func_71851_a(1);
   this.field_73839_d.func_110434_K().func_110577_a(TextureMap.field_110575_b);
   float var5 = var4.func_94209_e();
   float var6 = var4.func_94206_g();
   float var7 = var4.func_94212_f();
   float var8 = var4.func_94210_h();
   Tessellator var9 = Tessellator.field_78398_a;
   var9.func_78382_b();
   var9.func_78374_a(0.0D, (double)p_130015_3_, -90.0D, (double)var5, (double)var8);
   var9.func_78374_a((double)p_130015_2_, (double)p_130015_3_, -90.0D, (double)var7, (double)var8);
   var9.func_78374_a((double)p_130015_2_, 0.0D, -90.0D, (double)var7, (double)var6);
   var9.func_78374_a(0.0D, 0.0D, -90.0D, (double)var5, (double)var6);
   var9.func_78381_a();
   GL11.glDepthMask(true);
   GL11.glEnable(2929);
   GL11.glEnable(3008);
   GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:31,代码来源:GuiIngame.java

示例11: registerIcons

import net.minecraft.util.Icon; //导入依赖的package包/类
@SideOnly(Side.CLIENT)

    /**
     * When this method is called, your block should register all the icons it needs with the given IconRegister. This
     * is the only chance you get to register icons.
     */
    public void registerIcons(IconRegister par1IconRegister)
    {
        this.iconArray = new Icon[3];

        for (int i = 0; i < this.iconArray.length; ++i)
        {
            this.iconArray[i] = par1IconRegister.registerIcon(this.getTextureName() + "_stage_" + i);
        }
    }
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:16,代码来源:BlockNetherStalk.java

示例12: getEndIcon

import net.minecraft.util.Icon; //导入依赖的package包/类
@SideOnly(Side.CLIENT)

    /**
     * The icon for the tops and bottoms of the block.
     */
    protected Icon getEndIcon(int par1)
    {
        return this.tree_top[par1];
    }
 
开发者ID:MinecraftModArchive,项目名称:Runes-And-Silver,代码行数:10,代码来源:RuneLog.java

示例13: registerIcons

import net.minecraft.util.Icon; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister){
	icons = new Icon[2];
	
	for (int i = 0; i < icons.length; i++){
		icons[i] = par1IconRegister.registerIcon(UniversalCoins.modid + ":" +
												  		this.getUnlocalizedName().substring(5) + i);
	}
}
 
开发者ID:TED-996,项目名称:UniversalCoinsMod,代码行数:10,代码来源:BlockTradeStation.java

示例14: registerIcons

import net.minecraft.util.Icon; //导入依赖的package包/类
@SideOnly(Side.CLIENT)

    /**
     * When this method is called, your block should register all the icons it needs with the given IconRegister. This
     * is the only chance you get to register icons.
     */
    public void registerIcons(IconRegister par1IconRegister)
    {
    	//this.iconArray = new Icon[] { par1IconRegister.registerIcon(Main.modid + ":" + "RuneFire_" + Color + "_0"), par1IconRegister.registerIcon(Main.modid + ":" + "RuneFire_" + Color + "_1") };
    	this.iconArray = new Icon[] { par1IconRegister.registerIcon(RunesAndSilver.modid + ":" + "RuneFire_Red" + "_0"), par1IconRegister.registerIcon(RunesAndSilver.modid + ":" + "RuneFire_Red" + "_1")};
    }
 
开发者ID:MinecraftModArchive,项目名称:Runes-And-Silver,代码行数:12,代码来源:FireRed.java

示例15: getBackgroundIconIndex

import net.minecraft.util.Icon; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
/**
 * Returns the icon index on items.png that is used as background image of the slot.
 */
public Icon getBackgroundIconIndex ()
{
    return ItemArmor.func_94602_b(this.armorType);
}
 
开发者ID:Unrelentless,项目名称:FantasyCraft-Mod,代码行数:9,代码来源:SlotArmorCopy.java


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