mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-26 23:13:07 +00:00
Add a hook for the default color and use it for arrow fletchlings and bowstrings
This commit is contained in:
1 parent
7c3e21be8d
commit
f78d8af170
3 files changed
+32
-2
No files matched your search
@@ -675,7 +675,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
|
||||
return super.getColorFromItemStack(stack, renderPass);
|
||||
}
|
||||
|
||||
private int getCorrectColor(ItemStack stack, int renderPass, NBTTagCompound tags, String key, Map<Integer, IIcon> map)
|
||||
protected int getCorrectColor(ItemStack stack, int renderPass, NBTTagCompound tags, String key, Map<Integer, IIcon> map)
|
||||
{
|
||||
// custom coloring
|
||||
if(tags.hasKey(key + "Color"))
|
||||
@@ -687,7 +687,12 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
|
||||
return super.getColorFromItemStack(stack, renderPass);
|
||||
|
||||
// color default texture with material color
|
||||
return TConstructRegistry.getMaterial(matId).primaryColor();
|
||||
return getDefaultColor(renderPass, matId);
|
||||
}
|
||||
|
||||
protected int getDefaultColor(int renderPass, int materialID)
|
||||
{
|
||||
return TConstructRegistry.getMaterial(materialID).primaryColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user