Add a minimal textures option that only uses colored parts and no custom textures for less graphic memory usage. Let's see if this helps.

This commit is contained in:
Bernhard Bonigl committed 2014-09-26 17:18:36 +02:00
1 parent 2f80edd655
commit 1eb4c50fb5
3 files changed
+15 -9

No files matched your search

@@ -15,6 +15,7 @@ import tconstruct.library.TConstructRegistry;
import tconstruct.library.util.IToolPart;
import tconstruct.library.util.TextureHelper;
import tconstruct.tools.TinkerTools;
import tconstruct.util.config.PHConstruct;
import java.util.List;
import java.util.Map;
@@ -115,12 +116,13 @@ public class DynamicToolPart extends CraftingItem implements IToolPart
this.icons = new IIcon[max+1];
// register icon for each material that has one
for(Map.Entry<Integer, tconstruct.library.tools.ToolMaterial> entry : TConstructRegistry.toolMaterials.entrySet())
{
String tex = modTexPrefix + ":" + folder + entry.getValue().materialName.toLowerCase() + texture;
if(TextureHelper.itemTextureExists(tex))
this.icons[entry.getKey()] = iconRegister.registerIcon(tex);
}
if(!PHConstruct.minimalTextures)
for(Map.Entry<Integer, tconstruct.library.tools.ToolMaterial> entry : TConstructRegistry.toolMaterials.entrySet())
{
String tex = modTexPrefix + ":" + folder + entry.getValue().materialName.toLowerCase() + texture;
if(TextureHelper.itemTextureExists(tex))
this.icons[entry.getKey()] = iconRegister.registerIcon(tex);
}
// default texture
this.defaultIcon = iconRegister.registerIcon(modTexPrefix + ":" + folder + texture);
@@ -21,6 +21,7 @@ import tconstruct.library.modifier.*;
import tconstruct.library.util.TextureHelper;
import tconstruct.tools.TinkerTools;
import tconstruct.tools.entity.FancyEntityItem;
import tconstruct.util.config.PHConstruct;
/**
* NBTTags Main tag - InfiTool
@@ -214,6 +215,10 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
private void addIcons(HashMap<Integer, String> textures, HashMap<Integer, IIcon> icons, IIconRegister iconRegister, String standard)
{
// compatibility mode: no specific textures
if(PHConstruct.minimalTextures)
textures.clear();
icons.clear();
for(Map.Entry<Integer, String> entry : textures.entrySet())
{
@@ -221,9 +226,6 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
icons.put(entry.getKey(), iconRegister.registerIcon(entry.getValue()));
}
// get the mod id stuff.
if(standard != null && !standard.isEmpty()) {
standard = getDefaultTexturePath() + "/" + standard;
icons.put(-1, iconRegister.registerIcon(standard));