Jump to content

[1.6.4] External textures, Icon object


Sanquira

Recommended Posts

Hi I want to use some textures from external source. I's image downloaded everytime i run minecraft.

 

There is no problem with downloading part, but i have only Image or ImageIcon object. I don't know how to get minecraft Icon object. Is possible to convert it?

 

Thanks for help

Link to comment
Share on other sites

Hi

 

Minecraft takes the image for each icon and stitches it into a single texture sheet (one for items, one for blocks).  You can do this yourself I think, by overriding TextureAtlasSprite and registering that instead of a vanilla icon - overriding loadSprite and/or getFrameTextureData.  (not sure of the details - try digging into TextureMap.loadTextureAtlas to watch what happens with each vanilla icon (->TextureAtlasSprite.loadSprite)).

 

Alternatively, bind the texture yourself and use the Tessellator to render the texture.  (Do you know what I mean there?)

 

-TGG

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.