diff --git a/src/main/java/ab/api/recipe/lexicon/AdvancedPlateCraftPage.java b/src/main/java/ab/api/recipe/lexicon/AdvancedPlateCraftPage.java index 2d19d7c..182c6bf 100644 --- a/src/main/java/ab/api/recipe/lexicon/AdvancedPlateCraftPage.java +++ b/src/main/java/ab/api/recipe/lexicon/AdvancedPlateCraftPage.java @@ -10,6 +10,7 @@ import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; +import net.minecraftforge.oredict.OreDictionary; import org.lwjgl.opengl.GL11; @@ -68,14 +69,24 @@ public class AdvancedPlateCraftPage extends PageRecipe { TextureManager render = (Minecraft.getMinecraft()).renderEngine; renderItemAtGridPos(gui, 3, 0, recipe.getOutput(), false); renderItemAtGridPos(gui, 2, 1, new ItemStack(BlockListAB.blockABPlate), false); - List inputs = recipe.getInputs(); + List inputs = recipe.getInputs(); int degreePerInput = (int) (360.0F / inputs.size()); float currentDegree = ConfigHandler.lexiconRotatingItems ? (GuiScreen.isShiftKeyDown() ? this.ticksElapsed : (this.ticksElapsed + ClientTickHandler.partialTicks)) : 0.0F; - for (ItemStack obj : inputs) { - ItemStack copy = obj.copy(); - if (copy.getItemDamage() == 32767) copy.setItemDamage(0); - renderItemAtAngle(gui, currentDegree, copy); + for (Object obj : inputs) { + ItemStack copy = null; + if (obj instanceof String oreName) { + List ores = OreDictionary.getOres(oreName); + if (!ores.isEmpty()) { + copy = ores.get(0).copy(); + } + } else if (obj instanceof ItemStack itemStack) { + copy = itemStack.copy(); + } + if (copy != null) { + if (copy.getItemDamage() == OreDictionary.WILDCARD_VALUE) copy.setItemDamage(0); + renderItemAtAngle(gui, currentDegree, copy); + } currentDegree += degreePerInput; } renderManaBar(gui, mx, my); @@ -116,7 +127,7 @@ public class AdvancedPlateCraftPage extends PageRecipe { } public List getDisplayedRecipes() { - ArrayList list = new ArrayList(); + ArrayList list = new ArrayList<>(); list.add(recipe.getOutput()); return list; } diff --git a/src/main/java/ab/common/lib/register/RecipeListAB.java b/src/main/java/ab/common/lib/register/RecipeListAB.java index 8902efe..8647897 100644 --- a/src/main/java/ab/common/lib/register/RecipeListAB.java +++ b/src/main/java/ab/common/lib/register/RecipeListAB.java @@ -11,6 +11,7 @@ import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; @@ -173,7 +174,7 @@ public class RecipeListAB implements IModHelper { 11); manaFlowerRecipe = AdvancedBotanyAPI.registerAlphirineRecipe( new ItemStack(ItemListAB.itemABResource, 1, 4), - new ItemStack(ModBlocks.flower, 1, 32767), + new ItemStack(ModBlocks.flower, 1, OreDictionary.WILDCARD_VALUE), 32); hopperRecipe = AdvancedBotanyAPI.registerAlphirineRecipe( new ItemStack(BlockListAB.blockEngineerHopper), @@ -475,7 +476,7 @@ public class RecipeListAB implements IModHelper { 'G', new ItemStack(ModBlocks.manaGlass), 'W', - new ItemStack(ModItems.twigWand, 1, 32767), + new ItemStack(ModItems.twigWand, 1, OreDictionary.WILDCARD_VALUE), 'D', new ItemStack(ModBlocks.dreamwood), 'M', @@ -597,7 +598,7 @@ public class RecipeListAB implements IModHelper { 'G', new ItemStack(ModBlocks.elfGlass), 'D', - new ItemStack(ModBlocks.floatingFlower, 1, 32767), + new ItemStack(ModBlocks.floatingFlower, 1, OreDictionary.WILDCARD_VALUE), 'E', "plateElvenElementium", 'R', @@ -740,7 +741,7 @@ public class RecipeListAB implements IModHelper { " WS", "W ", 'S', - new ItemStack(ModItems.grassSeeds, 1, 32767), + new ItemStack(ModItems.grassSeeds, 1, OreDictionary.WILDCARD_VALUE), 'C', new ItemStack(BlockListAB.blockLebethron, 1, 4), 'W',