java类net.minecraft.client.renderer.texture.IconRegister的实例源码

BlockFluid.java 文件源码 项目:RuneCraftery 阅读 23 收藏 0 点赞 0 评论 0
@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)
    {
        if (this.blockMaterial == Material.lava)
        {
            this.theIcon = new Icon[] {par1IconRegister.registerIcon("lava_still"), par1IconRegister.registerIcon("lava_flow")};
        }
        else
        {
            this.theIcon = new Icon[] {par1IconRegister.registerIcon("water_still"), par1IconRegister.registerIcon("water_flow")};
        }
    }
BlockLogMedieval.java 文件源码 项目:MineFantasy 阅读 33 收藏 0 点赞 0 评论 0
@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 reg)
    {
        this.tree_top = new Icon[treeTextureTypes.length];

        for (int i = 0; i < this.tree_top.length; ++i)
        {
            this.tree_top[i] = reg.registerIcon("MineFantasy:Tree/" + treeTextureTypes[i] + "_top");
        }
        this.iconArray = new Icon[treeTextureTypes.length];

        for (int i = 0; i < this.iconArray.length; ++i)
        {
            this.iconArray[i] = reg.registerIcon("MineFantasy:Tree/" + treeTextureTypes[i] + "_side");
        }
    }
BlockStoneBrick.java 文件源码 项目:RuneCraftery 阅读 26 收藏 0 点赞 0 评论 0
@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.field_94408_c = new Icon[field_94407_b.length];

        for (int i = 0; i < this.field_94408_c.length; ++i)
        {
            String s = this.getTextureName();

            if (field_94407_b[i] != null)
            {
                s = s + "_" + field_94407_b[i];
            }

            this.field_94408_c[i] = par1IconRegister.registerIcon(s);
        }
    }
BlockWithCustomBlockRenderer.java 文件源码 项目:ExampleMod 阅读 21 收藏 0 点赞 0 评论 0
@Override
public void registerIcons(IconRegister registry) {
    Icons.top = registry.registerIcon("examplemod:top");
    Icons.bottom = registry.registerIcon("examplemod:bottom");
    Icons.front = registry.registerIcon("examplemod:front");
    Icons.back = registry.registerIcon("examplemod:back");
    Icons.left = registry.registerIcon("examplemod:left");
    Icons.right = registry.registerIcon("examplemod:right");

    setTexture(ForgeDirection.EAST, Icons.left);
    setTexture(ForgeDirection.WEST, Icons.right);
    setTexture(ForgeDirection.SOUTH, Icons.front);
    setTexture(ForgeDirection.NORTH, Icons.back);
    setTexture(ForgeDirection.UP, Icons.top);
    setTexture(ForgeDirection.DOWN, Icons.bottom);
    setDefaultTexture(Icons.front);
}
IceSword.java 文件源码 项目:IceMod 阅读 20 收藏 0 点赞 0 评论 0
@Override   
@SideOnly(Side.CLIENT)

    public void registerIcons(IconRegister iconRegister)
    {
        this.itemIcon = iconRegister.registerIcon(texturePath); 
    }
FrozenStick.java 文件源码 项目:IceMod 阅读 22 收藏 0 点赞 0 评论 0
@Override   
@SideOnly(Side.CLIENT)

    public void registerIcons(IconRegister iconRegister)
    {
        this.itemIcon = iconRegister.registerIcon(texturePath);
    }
IcePickaxe.java 文件源码 项目:IceMod 阅读 23 收藏 0 点赞 0 评论 0
@Override   
@SideOnly(Side.CLIENT)

    public void registerIcons(IconRegister iconRegister)
    {
        this.itemIcon = iconRegister.registerIcon(texturePath);
    }
IceFragment.java 文件源码 项目:IceMod 阅读 25 收藏 0 点赞 0 评论 0
@Override   
@SideOnly(Side.CLIENT)

    public void registerIcons(IconRegister iconRegister)
    {
        this.itemIcon = iconRegister.registerIcon(texturePath);
    }
FlintAndIce.java 文件源码 项目:IceMod 阅读 19 收藏 0 点赞 0 评论 0
@Override   
@SideOnly(Side.CLIENT)


    public void registerIcons(IconRegister iconRegister)
    {
        this.itemIcon = iconRegister.registerIcon(texturePath);
    }
HunkOIce.java 文件源码 项目:IceMod 阅读 18 收藏 0 点赞 0 评论 0
@Override   
@SideOnly(Side.CLIENT)

    public void registerIcons(IconRegister iconRegister)
    {
        this.itemIcon = iconRegister.registerIcon(texturePath);
    }
CondensedPotionItem.java 文件源码 项目:OldMods 阅读 21 收藏 0 点赞 0 评论 0
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
    potionIcon = par1IconRegister.registerIcon(this.getIconString() + "_" + "bottle_drinkable");
    splashIcon = par1IconRegister.registerIcon(this.getIconString() + "_" + "bottle_splash");
    contentsIcon = par1IconRegister.registerIcon(this.getIconString() + "_" + "overlay");
}
ItemBlock.java 文件源码 项目:RuneCraftery 阅读 19 收藏 0 点赞 0 评论 0
@SideOnly(Side.CLIENT)
public void func_94581_a(IconRegister p_94581_1_) {
   String var2 = Block.field_71973_m[this.field_77885_a].func_94327_t_();
   if(var2 != null) {
      this.field_94588_b = p_94581_1_.func_94245_a(var2);
   }

}
BlockTallGrass.java 文件源码 项目:RuneCraftery 阅读 22 收藏 0 点赞 0 评论 0
@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[grassTypes.length];

        for (int i = 0; i < this.iconArray.length; ++i)
        {
            this.iconArray[i] = par1IconRegister.registerIcon(grassTypes[i]);
        }
    }
OreAstralSilver.java 文件源码 项目:Ex-AliquoRedux 阅读 18 收藏 0 点赞 0 评论 0
public void registerIcons(IconRegister register)
{
    icon = new Icon[3];

    for (int i = 0; i < icon.length; i++)
    {
        icon[i] = register.registerIcon("exaliquo:" + Registries.oreType[i] + "/Block" + name + Registries.oreType[i]);
    }
}
NightShadePod.java 文件源码 项目:Runes-And-Silver 阅读 19 收藏 0 点赞 0 评论 0
@SideOnly(Side.CLIENT)
    public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
         {
        this.itemIcon = reg.registerIcon(RunesAndSilver.modid + ":" + (this.getUnlocalizedName().substring(5)));

}
    }
ItemBasePrefab.java 文件源码 项目:MC-MineAPI.Java 阅读 22 收藏 0 点赞 0 评论 0
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegistry)
{
    // Grab the subtypes array for this item (some will contain one and others many).
    SubItemsArchive[] subItemsArray = this.getRegisteredItem().getSubItems();
    if (subItemsArray != null)
    {
        // Loop through all sub-items and grab rendering pass data.
        for (SubItemsArchive subItem : subItemsArray)
        {
            // Grab all of the render passes that this sub-item will need.
            RenderPassArchive[] itemRenderPasses = subItem.getRenderPassArchive();

            // Associate via mapping render passes to a given registered icon.
            for (RenderPassArchive renderPassObject : itemRenderPasses)
            {
                //                    // Register a single icon for those items which have but one.
                //                    if (this.getRegisteredItem().getRenderPassCount() == 1 && renderPassObject.getRenderPass() == 0)
                //                    {
                //                        // Use the zero index (first) item in the icon archive that should be primary icon even if no sub-types.
                //                        this.itemIcon = iconRegistry.registerIcon(MadMod.ID + ":" + renderPassObject.getIconPath());
                //                        this.iconString = itemIcon.getIconName();
                //                    }

                // Items with multiple render passes have their icons registered in a mapping local to the item instance.
                clientRegisteredIcons.put( subItem.getItemName() + "_" +
                                           renderPassObject.getRenderPass(),
                                           iconRegistry.registerIcon( ModMetadata.ID +
                                                                      ":" +
                                                                      renderPassObject.getIconPath() ) );
            }
        }
    }
}
ItemDye.java 文件源码 项目:RuneCraftery 阅读 27 收藏 0 点赞 0 评论 0
@SideOnly(Side.CLIENT)
public void func_94581_a(IconRegister p_94581_1_) {
   this.field_94594_d = new Icon[field_94595_b.length];

   for(int var2 = 0; var2 < field_94595_b.length; ++var2) {
      this.field_94594_d[var2] = p_94581_1_.func_94245_a(this.func_111208_A() + "_" + field_94595_b[var2]);
   }

}
ItemSkins.java 文件源码 项目:FantasyCraft-Mod 阅读 48 收藏 0 点赞 0 评论 0
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister icon) {
icons = new Icon[Strings.UNLOC_ITEM_SKINS.length];

    for(int i = 0; i < icons.length; i++) {
        icons[i] = icon.registerIcon(Reference.MODID.toLowerCase() + ":" + Strings.UNLOC_ITEM_SKINS[i]);
    }
}
ItemBombMF.java 文件源码 项目:MineFantasy 阅读 22 收藏 0 点赞 0 评论 0
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IconRegister reg)
{
    this.icons[0] = reg.registerIcon("MineFantasy:Weapon/bomb/bomb_base");
    this.icons[1] = reg.registerIcon("MineFantasy:Weapon/bomb/bomb_fire");
    this.icons[2] = reg.registerIcon("MineFantasy:Weapon/bomb/bomb_poison");
    this.icons[3] = reg.registerIcon("MineFantasy:Weapon/bomb/bomb_concussion");
}
BlockCocoa.java 文件源码 项目:RuneCraftery 阅读 32 收藏 0 点赞 0 评论 0
@SideOnly(Side.CLIENT)
public void func_94332_a(IconRegister p_94332_1_) {
   this.field_94469_b = new Icon[3];

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

}
MithrilSpade.java 文件源码 项目:Runes-And-Silver 阅读 22 收藏 0 点赞 0 评论 0
@SideOnly(Side.CLIENT)
    public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
         {
        this.itemIcon = reg.registerIcon(RunesAndSilver.modid + ":" + (this.getUnlocalizedName().substring(5)));

}
    }
ItemCrossbow.java 文件源码 项目:MineFantasy 阅读 21 收藏 0 点赞 0 评论 0
@Override
@SideOnly(Side.CLIENT)
   public void registerIcons(IconRegister reg)
   {
    stock = reg.registerIcon("MineFantasy:Weapon/" + firearm.getName() + "_stock");

    head = new Icon[2];
    head[0] = reg.registerIcon("MineFantasy:Weapon/" + firearm.getName() + "_unload");
    head[1] = reg.registerIcon("MineFantasy:Weapon/" + firearm.getName() + "_loaded");
   }
ItemBowMF.java 文件源码 项目:MineFantasy 阅读 25 收藏 0 点赞 0 评论 0
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IconRegister reg)
{
    this.itemIcon = reg.registerIcon(this.getIconString());
    for (int i = 0; i < 3; ++i)
    {
        this.iconArray[i] = reg.registerIcon(this.getIconString() + "_" + (i+1));
    }
}
ItemIngot.java 文件源码 项目:Exoskeleton 阅读 23 收藏 0 点赞 0 评论 0
@Override
public void registerIcons(IconRegister register){
    this.textures = new Icon[ItemIngot.NAMES.length];

    for(int i = 0; i < ItemIngot.NAMES.length; i++){
        this.textures[i] = register.registerIcon("exo:ingots/" + ItemIngot.NAMES[i]);
    }
}
BlockEndEye.java 文件源码 项目:Ex-Aliquo 阅读 25 收藏 0 点赞 0 评论 0
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister register)
{
    icon = new Icon[3];

    for (int i = 0; i < icon.length; i++)
    {
        icon[i] = register.registerIcon("exaliquo:EnderEye_" + i);
    }
}
OreKalendrite.java 文件源码 项目:Ex-AliquoRedux 阅读 21 收藏 0 点赞 0 评论 0
public void registerIcons(IconRegister register)
{
    icon = new Icon[3];

    for (int i = 0; i < icon.length; i++)
    {
        icon[i] = register.registerIcon("exaliquo:" + Registries.oreType[i] + "/Block" + name + Registries.oreType[i]);
    }
}
ItemOreLemurite.java 文件源码 项目:Ex-AliquoRedux 阅读 21 收藏 0 点赞 0 评论 0
public void registerIcons(IconRegister register)
{
    icon = new Icon[3];

    for (int i = 0; i < icon.length; i++)
    {
        icon[i] = register.registerIcon("exaliquo:" + Registries.oreType[i] + "/Item" + name + Registries.oreType[i]);
    }
}
WaterPickAxe.java 文件源码 项目:Runes-And-Silver 阅读 17 收藏 0 点赞 0 评论 0
@SideOnly(Side.CLIENT)
    public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
         {
        this.itemIcon = reg.registerIcon(RunesAndSilver.modid + ":" + (this.getUnlocalizedName().substring(5)));

}
    }
BlockJungleMud.java 文件源码 项目:FantasyCraft-Mod 阅读 22 收藏 0 点赞 0 评论 0
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister){

    //registers the block texture to block
    blockIcon = iconRegister.registerIcon(String.format("%s:%s", Reference.MODID.toLowerCase(), getUnwrappedUnlocalizedName(this.getUnlocalizedName())));   
}
OreZinc.java 文件源码 项目:Ex-AliquoRedux 阅读 22 收藏 0 点赞 0 评论 0
public void registerIcons(IconRegister register)
{
    icon = new Icon[3];

    for (int i = 0; i < icon.length; i++)
    {
        icon[i] = register.registerIcon("exaliquo:" + Registries.oreType[i] + "/Block" + name + Registries.oreType[i]);
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号