Reverted Tool Recipe changes, made colorizing use NBT

This commit is contained in:
Vexatos committed 2014-09-21 11:43:53 +02:00
1 parent 4022ea185a
commit ab87cc706e
4 files changed
+43 -48

No files matched your search

@@ -662,9 +662,6 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
return 1.0f;
}
public static HashMap<Integer, Integer> materialColorMap = new HashMap<Integer, Integer>();
@Override
public int getColorFromItemStack(ItemStack stack, int renderPass) {
@@ -675,24 +672,24 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
tags = stack.getTagCompound().getCompoundTag("InfiTool");
if (renderPass < getPartAmount())
{
if (renderPass == 0 && materialColorMap.containsKey(tags.getInteger("Handle"))) // Handle
if (renderPass == 0 && tags.hasKey("HandleColor")) // Handle
{
return materialColorMap.get(tags.getInteger("Handle"));
return tags.getInteger("HandleColor");
}
else if (renderPass == 1 && materialColorMap.containsKey(tags.getInteger("Head"))) // Head
else if (renderPass == 1 && tags.hasKey("HeadColor")) // Head
{
return materialColorMap.get(tags.getInteger("Head"));
return tags.getInteger("HeadColor");
}
else if (renderPass == 2 && materialColorMap.containsKey(tags.getInteger("Accessory"))) // Accessory
else if (renderPass == 2 && tags.hasKey("AccessoryColor")) // Accessory
{
return materialColorMap.get(tags.getInteger("Accessory"));
return tags.getInteger("AccessoryColor");
}
else if (renderPass == 3 && materialColorMap.containsKey(tags.getInteger("Extra"))) // Extra
else if (renderPass == 3 && tags.hasKey("ExtraColor")) // Extra
{
return materialColorMap.get(tags.getInteger("Extra"));
return tags.getInteger("ExtraColor");
}
}
}