mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-27 01:08:34 +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.api.booklet.internal.GuiBookletBase;
|
||||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||||
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||||
|
@ -32,10 +33,13 @@ public class PageFurnace extends BookletPage{
|
||||||
|
|
||||||
private static ItemStack getInputForOutput(ItemStack output){
|
private static ItemStack getInputForOutput(ItemStack output){
|
||||||
for(Map.Entry<ItemStack, ItemStack> entry : FurnaceRecipes.instance().getSmeltingList().entrySet()){
|
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 entry.getKey();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue