Modding in Minecraft

Discussion in 'Java' started by CJJ, Jan 26, 2012.

  1. CJJ


    Jan 26, 2012
    Likes Received:
    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
    public class mod_Recipe extends BaseMod

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

    This though leads to the following new error:

    src/minecraft/net/minecraft/src/ '{' expected
    public class 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:
    CJJ, Jan 26, 2012
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.