Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.11.2] Smelting OreDictionary


abused_master
 Share

Recommended Posts

Hey guys, so im having a bit of trouble figuring out oreDictionary for smelting recipes, iv done this for crafting recipes:

    public static void addShapedRecipe(ItemStack output, Object... input){
        GameRegistry.addRecipe(new ShapedOreRecipe(output, input));
    }

    public static void addShapelessRecipe(ItemStack output, Object... input){
        GameRegistry.addRecipe(new ShapelessOreRecipe(output, input));
    }

but i cant figure out how to do this for smelting recipes

Link to comment
Share on other sites

Is there no way around it? someone suggested i do something like this:

    public static ItemStack getOreDict(String oreIdName) {
        List<ItemStack> res = OreDictionary.getOres(oreIdName);
        if (res != null) {
            ItemStack[] res2 = res.toArray(new ItemStack[res.size()]);
            for (int i = 0; i < res.size(); ++i) {
                return new ItemStack(res2[i].getItem());
            }
        }
        return null;
    }

thought id get some others opinions on it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.