Merge branch 'master-MC1.9.4' of github.com:MightyPirates/OpenComputers into master-MC1.10

This commit is contained in:
Florian Nücke 2016-07-03 19:59:25 +02:00
commit 0f7d40319f

View File

@ -15,10 +15,10 @@ class LootDiskCyclingRecipe extends IRecipe {
}
override def getCraftingResult(crafting: InventoryCrafting): ItemStack = {
val lootDiskStacks = Loot.worldDisks.map(_._1)
collectStacks(crafting).find(Loot.isLootDisk) match {
case Some(lootDisk) =>
case Some(lootDisk) if lootDiskStacks.nonEmpty =>
val lootFactoryName = getLootFactoryName(lootDisk)
val lootDiskStacks = Loot.worldDisks.map(_._1)
val oldIndex = lootDiskStacks.indexWhere(s => getLootFactoryName(s) == lootFactoryName)
val newIndex = (oldIndex + 1) % lootDiskStacks.length
lootDiskStacks(newIndex).copy()