mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-14 04:09:09 +01:00
fix an exception in the booklet with broken furnace recipes
This commit is contained in:
parent
93ac064869
commit
d7561ddb82
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;
|
||||
|
@ -32,8 +33,11 @@ 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)){
|
||||
return entry.getKey();
|
||||
ItemStack stack = entry.getValue();
|
||||
if(StackUtil.isValid(stack)){
|
||||
if(stack.isItemEqual(output)){
|
||||
return entry.getKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue