Modding in Minecraft

CJJ

Joined
Jan 26, 2012
Messages
1
Reaction score
0
Hey i'm using trying to add a new crafting recipe into my minecraft (1.1) I'm using modloader and minecraft coder pack. Based on a tutorial i watched my code currently is:

package net.minecraft.src;
import java.util.Random;
public class mod_Recipe extends BaseMod
{public void load() {ModLoader.AddRecipe(new ItemStack(Item.diamond, 9), new Object[]{
"***", "***","***", Character.valueOf('*'), Block.wood
}); } public String getVersion() { return "1.1"; }
}

This always leads to the following error though:
class mod_Recipe is public, should be declared in a file named mod_Recipe.java
public class mod_Recipe extends BaseMod

So then i obviously changed my third line to:
public class mod_Recipe.java extends BaseMod

This though leads to the following new error:

src/minecraft/net/minecraft/src/Mod_Recipe.java:3: '{' expected
public class mod_Recipe.java extends BaseMod
^
This is intended to have 9 blocks of wood make a block of diamond in minecraft and im using the most up-to-date versions of all the applications, as of yesterday.

Please help dunno what to do! :dontknow:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top