You have to open and close your class with { … } like:
public class mod_MyMod extends BaseMod
{
public String Version()
{
return “1.2_02”;
}
public void AddRecipes(CraftingManager recipes)
{
recipes.addRecipe(new ItemStack(Item.diamond), new Object[] {
“#”, Character.valueOf(‘#’), Block.dirt });
}
}
You need to enclose your class in { and }. A few extra pointers: According to the Java coding conventions, you should
Put your { on the same line as the method declaration:
Name your classes using CamelCase (with initial capital letter)
Name your methods using camelCase (with small initial letter)
Here’s how I would write it:
public class ModMyMod extends BaseMod {
public String version() {
return “1.2_02”;
}
public void addRecipes(CraftingManager recipes) {
recipes.addRecipe(new ItemStack(Item.diamond), new Object[] {
“#”, Character.valueOf(‘#’), Block.dirt
});
}
}