allowing subID value 'any' as wildcard (instead of the actual number that is the wildcard)

This commit is contained in:
Florian Nücke 2013-12-28 17:22:03 +01:00
parent d1cbe2c2b2
commit 1c0a03ab65
2 changed files with 2 additions and 1 deletions

View File

@ -78,7 +78,7 @@ generatorUpgrade {
}
navigationUpgrade {
input: [[ingotGold, compass, ingotGold]
["oc:circuitElite", {item=map, subID=32767}, "oc:circuitElite"]
["oc:circuitElite", {item=map, subID=any}, "oc:circuitElite"]
[ingotGold, potion, ingotGold]]
}
signUpgrade {

View File

@ -264,6 +264,7 @@ object Recipes {
private def tryGetId(ingredient: java.util.HashMap[String, _]): Int =
if (ingredient.contains("subID")) ingredient.get("subID") match {
case id: Number => id.intValue
case "any" => 32767
case id: String => Integer.valueOf(id)
case _ => 0
} else 0