Updated FurnaceFuelHandler thanks to @Syndaryl. Closes #341

This commit is contained in:
Adubbz 2014-09-28 07:15:44 +10:00
parent 545130e566
commit 5db9d1ec7d

View file

@ -69,15 +69,23 @@ public class FurnaceFuelHandler implements IFuelHandler
addFuel(Item.getItemFromBlock(block), 0, value);
}
private static int getFuelValue(ItemStack stack)
{
Pair<Item, Integer> pair = Pair.of(stack.getItem(), stack.getItemDamage());
private static int getFuelValue(ItemStack stack)
{
Pair<Item, Integer> pair = Pair.of(stack.getItem(), stack.getItemDamage());
if (fuelList.containsKey(pair))
{
return fuelList.get(pair);
}
else
{
pair = Pair.of(stack.getItem(), 0);
if (fuelList.containsKey(pair))
{
return fuelList.get(pair);
}
}
return 0;
}
return 0;
}
}