Skip to content

Instantly share code, notes, and snippets.

@mDiyo
Last active December 14, 2015 17:59
Show Gist options
  • Save mDiyo/5126313 to your computer and use it in GitHub Desktop.
Save mDiyo/5126313 to your computer and use it in GitHub Desktop.
Icon base code
public Icon[] icons;
public abstract String[] getTextureNames();
public void updateIcons(IconRegister iconRegister)
{
String[] textureNames = getTextureNames();
this.icons = new Icon[textureNames.length];
for (int i = 0; i < this.icons.length; ++i)
{
this.icons[i] = iconRegister.registerIcon("arbitraryname:"+"subfolder/"+textureNames[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment