Fix ore doubling potentially adding invalid recipes (#1051)

This commit is contained in:
Nicholas Ignoffo 2017-02-13 17:13:28 -08:00
parent ddb7542827
commit 9027f767a6

View file

@ -454,8 +454,9 @@ public class ModRecipes
{
String dustName = ore.replaceFirst("ore", "dust");
List<ItemStack> discoveredOres = OreDictionary.getOres(ore);
List<ItemStack> dustList = OreDictionary.getOres(dustName);
if (dustList != null && dustList.size() > 0)
if (dustList != null && !dustList.isEmpty() && discoveredOres != null && !discoveredOres.isEmpty())
{
ItemStack dustStack = dustList.get(0).copy();
dustStack.stackSize = 2;