Modding in Minecraft

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

  1. CJJ

    CJJ

    Joined:
    Jan 26, 2012
    Messages:
    1
    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:
    CJJ, Jan 26, 2012
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page