Skip to content

Commit

Permalink
Fix minimal textures not having modifier textures. (Oops)
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Oct 5, 2014
1 parent 0430391 commit f766427
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/main/java/tconstruct/library/tools/ToolCore.java
Expand Up @@ -202,22 +202,23 @@ public void registerEffectPath (int index, String location)
@Override
public void registerIcons (IIconRegister iconRegister)
{
addIcons(headStrings, headIcons, iconRegister, getIconSuffix(0));
addIcons(brokenPartStrings, brokenIcons, iconRegister, getIconSuffix(1));
addIcons(handleStrings, handleIcons, iconRegister, getIconSuffix(2));
addIcons(accessoryStrings, accessoryIcons, iconRegister, getIconSuffix(3));
addIcons(extraStrings, extraIcons, iconRegister, getIconSuffix(4));
boolean minimalTextures = PHConstruct.minimalTextures;
addIcons(headStrings, headIcons, iconRegister, getIconSuffix(0), minimalTextures);
addIcons(brokenPartStrings, brokenIcons, iconRegister, getIconSuffix(1), minimalTextures);
addIcons(handleStrings, handleIcons, iconRegister, getIconSuffix(2), minimalTextures);
addIcons(accessoryStrings, accessoryIcons, iconRegister, getIconSuffix(3), minimalTextures);
addIcons(extraStrings, extraIcons, iconRegister, getIconSuffix(4), minimalTextures);

addIcons(effectStrings, effectIcons, iconRegister, null);
addIcons(effectStrings, effectIcons, iconRegister, null, false);

emptyIcon = iconRegister.registerIcon("tinker:blankface");
}

private void addIcons(HashMap<Integer, String> textures, HashMap<Integer, IIcon> icons, IIconRegister iconRegister, String standard)
protected void addIcons(HashMap<Integer, String> textures, HashMap<Integer, IIcon> icons, IIconRegister iconRegister, String standard, boolean defaultOnly)
{
icons.clear();

if(!PHConstruct.minimalTextures) // compatibility mode: no specific textures
if(!defaultOnly) // compatibility mode: no specific textures
for(Map.Entry<Integer, String> entry : textures.entrySet())
{
if(TextureHelper.itemTextureExists(entry.getValue()))
Expand Down

0 comments on commit f766427

Please sign in to comment.