Jump to content

[1.7.10] how to change a item's texture in game.


leviathan01

Recommended Posts

    just use an array x being the number of different textures you want

IIcon[] Textures = new IIcon[x];

 

@SideOnly(Side.CLIENT)

    public void registerIcons(IIconRegister par1IconRegister)

    {

    // example of different textures assigned to a number

        this.Textures[0] = par1IconRegister.registerIcon(Reference.Mod_Id + ":" + "texture one");

        this.Textures[1] = par1IconRegister.registerIcon(Reference.Mod_Id + ":" + "texture two");

        this.Textures[2] = par1IconRegister.registerIcon(Reference.Mod_Id + ":" + "texture three");

        this.Textures[3] = par1IconRegister.registerIcon(Reference.Mod_Id + ":" + "texture four");

    }

 

once you have this just change the texture based on its damage value maybe?

Link to comment
Share on other sites

    just use an array x being the number of different textures you want

IIcon[] Textures = new IIcon[x];

 

@SideOnly(Side.CLIENT)

    public void registerIcons(IIconRegister par1IconRegister)

    {

    // example of different textures assigned to a number

        this.Textures[0] = par1IconRegister.registerIcon(Reference.Mod_Id + ":" + "texture one");

        this.Textures[1] = par1IconRegister.registerIcon(Reference.Mod_Id + ":" + "texture two");

        this.Textures[2] = par1IconRegister.registerIcon(Reference.Mod_Id + ":" + "texture three");

        this.Textures[3] = par1IconRegister.registerIcon(Reference.Mod_Id + ":" + "texture four");

    }

 

once you have this just change the texture based on its damage value maybe?

 

thanks but I knew all that I just do not know how to change the texture.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.