Jump to content

Would this work for a 5x5 Crafting grid recipe list?


Kore

Recommended Posts

I have and ItemStack[26][] saying that 0-24 is the inputs and 25 is the output.

 

package kore.mods.korecraft;

 

import net.minecraft.block.Block;

import net.minecraft.item.ItemStack;

 

public class RecipesKoreTable

{

 

ItemStack[][] recipes = new ItemStack[26][];

 

    private RecipesKoreTable()

    {

    this.addCrafting(new ItemStack(Korecraft.essenceExtractor), new ItemStack[]

    {

    new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),

    new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),

    new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),

    new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),

    new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone),new ItemStack(Block.cobblestone)});

    }

 

    /**

    * A metadata sensitive version of adding a furnace recipe.

    */

    public void addCrafting(ItemStack output, ItemStack[] input)

    {

    if(input.length==25){

    int length = recipes.length;

    for(int i=0;i<25;i++){

    recipes[length] = input;

    }

    recipes[25][length] = output;

    }

    }

}

 

 

The Korecraft Mod

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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