Merge pull request #1155 from Zarathul/master

Added soft return for modders passing invalid negative ids to OreDictionary.getOreName. Warning: WILL Error in 1.8+
This commit is contained in:
LexManos 2014-06-16 19:49:13 -07:00
commit 5ac6f2289b
1 changed files with 1 additions and 1 deletions

View File

@ -282,7 +282,7 @@ public class OreDictionary
*/
public static String getOreName(int id)
{
return id < idToName.size() ? idToName.get(id) : "Unknown";
return (id >= 0 && id < idToName.size()) ? idToName.get(id) : "Unknown";
}
/**