mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
Fix an exception due to broken furnace recipes in the booklet
Closes #631
This commit is contained in:
parent
e153fc872e
commit
e2dfaab2a7
1 changed files with 6 additions and 2 deletions
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.booklet.page;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
|
@ -36,10 +37,13 @@ public class PageFurnace extends BookletPage{
|
|||
|
||||
private static ItemStack getInputForOutput(ItemStack output){
|
||||
for(Map.Entry<ItemStack, ItemStack> entry : FurnaceRecipes.instance().getSmeltingList().entrySet()){
|
||||
if(entry.getValue().isItemEqual(output)){
|
||||
ItemStack stack = entry.getValue();
|
||||
if(StackUtil.isValid(stack)){
|
||||
if(stack.isItemEqual(output)){
|
||||
return entry.getKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue