Updated FurnaceFuelHandler thanks to @Syndaryl. Closes #341
This commit is contained in:
parent
545130e566
commit
5db9d1ec7d
1 changed files with 13 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue