Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I have been wondering how can I make it so in a recipe you need a certain amount of something? (for example 64 Stone, 38 Wood etc.)

  • Author

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?

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...

  • Author

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.

First of all, your Recipe class should implement IRecipe, then copy the addRecipe code from the CraftingManager and change the file declarations to your new class that extends IRecipe...

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.