Jump to content

Recipe Question


sealab865

Recommended Posts

You will need a custom crafting handler like in redpower its alloy furnace

That is not right at all.

You need to make a custom recipe (instance of IRecipe) and use that.

 

Thank you for replying, also I am clueless as to how I can do that, do you mind helping a little?

Link to comment
Share on other sites

Just copy the IRecipe into a new class file, make a new addRecipe, and add a small if statement into your IRecipe to check if the slot stacksize and item stacksize are the same...

 

It will force having the correct stackSizes but oncrafted it only removed 1 :\

I do not know how to fix this, just mess with it. Maybe make a craftingHandler, and set the oncrafted to check if it was your recipe? i dont know...

Link to comment
Share on other sites

Just copy the IRecipe into a new class file, make a new addRecipe, and add a small if statement into your IRecipe to check if the slot stacksize and item stacksize are the same...

 

It will force having the correct stackSizes but oncrafted it only removed 1 :\

I do not know how to fix this, just mess with it. Maybe make a craftingHandler, and set the oncrafted to check if it was your recipe? i dont know...

 

I'm one of those people who learn better from actually looking at code, I tried to do what you said but when it came to adding a new addRecipe eclipse was giving me errors saying 'Syntax Error at Token . / )'

 

package sealab.stackpack;

 

import cpw.mods.fml.common.registry.GameRegistry;

import net.minecraft.inventory.InventoryCrafting;

import net.minecraft.item.ItemStack;

import net.minecraft.world.World;

 

public interface StackRecipe

{

    /**

    * Used to check if a recipe matches current crafting inventory

    */

    boolean matches(InventoryCrafting var1, World var2);

 

    /**

    * Returns an Item that is the result of this recipe

    */

    ItemStack getCraftingResult(InventoryCrafting var1);

 

    /**

    * Returns the size of the recipe area

    */

    int getRecipeSize();

 

    ItemStack getRecipeOutput();

   

GameRegistry.addShapelessRecipe(new ItemStack(Base.stoneStack), new Object[]

new ItemStack(Base.Stack),

new ItemStack(Block.stone)

});

}

 

 

It's probably something obvious that I just looked past.

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.