Jump to content

Make an NEI plugin for recipes for custom "furnaces"


Alix_The_Alicorn

Recommended Posts

I've recently done it. Where you can find the most information about how to do it is in the NEI code itself, and especially codechicken.nei.recipe.TemplateRecipeHandler.java. You probably want to extend this class to fill it in your way. If you want an example, take a look at LP's NEI plugin: https://github.com/RS485/LogisticsPipes/tree/MC-1.5/common/logisticspipes/nei

 

What you can see there is for your plugin to be activated by NEI, you need a class that has the name NEIxxxxConfig.java and implements IConfigureNEI. When you do, this will be picked up by NEI (when it's installed), and it will invoke loadConfig().

Author of PneumaticCraft, MineChess, Minesweeper Mod and Sokoban Mod. Visit www.minemaarten.com to take a look at them.

Link to comment
Share on other sites

As NEI changes a baseclass (GuiContainer), and relies on CodeChickenCore to work, I don't think there is an other way to make NEI work in your workspace than putting them both in your Minecraft project from Eclipse (I'm also using 'the Pahimar setup'). But I would very much like to be corrected on that, as I also would like to have separate projects in Eclipse for CCC and NEI.

Author of PneumaticCraft, MineChess, Minesweeper Mod and Sokoban Mod. Visit www.minemaarten.com to take a look at them.

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...

I have NEI and CCC installed and made a plugin, and have two classes, The Config Handler and the Recipe handler, i go to compile it i get 61 errors about referencing the mods, how to I get this to compile

Use @Optional, and make sure the jars for NEI and CCC are in the forgeroot/libs folder. Example of @Optional:

 

package the_fireplace.unlogicii.compat.nei;

import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.Optional;
import net.minecraftforge.oredict.OreDictionary;
import the_fireplace.unlogicii.UnLogicII;
import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI;

@Optional.Interface(iface = "codechicken.nei.api.API", modid = "NotEnoughItems")
public class NEIUnLogicIIConfig implements IConfigureNEI {

@Optional.Method(modid = "NotEnoughItems")
@Override
public void loadConfig() {
	API.hideItem(new ItemStack(UnLogicII.obsidian_farmland));
	API.hideItem(new ItemStack(UnLogicII.quartz_crop, 1, OreDictionary.WILDCARD_VALUE));
	API.hideItem(new ItemStack(UnLogicII.shell));
}

@Optional.Method(modid = "NotEnoughItems")
@Override
public String getName() {
	return UnLogicII.MODNAME;
}

@Optional.Method(modid = "NotEnoughItems")
@Override
public String getVersion() {
	return UnLogicII.VERSION;
}

}

 

EDIT: Sorry for bumping a thread that is over a year old

If I helped please press the Thank You button.

 

Check out my mods at http://www.curse.com/users/The_Fireplace/projects

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.