Merge pull request #14 from HenryLoenwind/dyes

Fix for setting conduit channel color with a dye item in hand
This commit is contained in:
tterrag1098 committed 2015-10-06 01:24:57 -04:00
commit 3f546ee95d
1 file changed
+6 -7
@@ -49,14 +49,13 @@ public enum DyeColor {
if (dye == null) {
return null;
}
int oreId = OreDictionary.getOreID(dye);
if (oreId < 0) {
return null;
}
int[] oreIDs = OreDictionary.getOreIDs(dye);
for (int i = 0; i < DYE_ORE_NAMES.length; i++) {
String dyeName = DYE_ORE_NAMES[i];
if (OreDictionary.getOreID(dyeName) == oreId) {
return DyeColor.values()[i];
int dyeID = OreDictionary.getOreID(DYE_ORE_NAMES[i]);
for (int oreId : oreIDs) {
if (dyeID == oreId) {
return DyeColor.values()[i];
}
}
}
return null;