Im making my first mod but i keep getting errors in eclipse
Btw Im using modloader
package net.minecraft.src;
public class Blockmeat extends BaseMod{
private static final Block Blockmeat = null;
public Blockmeat(){
}
public String Version(){
return "0.1";
int BlockmeatId=100;
ModLoader.RegisterBlock(Blockmeat);
ModLoader.AddRecipe(new ItemStack(Blockmeat, 8), new Object[]{
"MMM", "MMM", "MMM",
Character.valueOf('M'), Item.porkRaw.
Blockmeat.setHardness(0.8F);
Blockmeat.setBlockName("Meatblock");
ModLoader.AddName(Blockmeat, "Meatblock");
}
Then the errors in eclipse
setBlockName cannot be resolved or is not a field line 21 Java Problem
Syntax error on token "public", { expected line 7 Java Problem
Syntax error, insert ";" to complete BlockStatements line 7 Java Problem
Syntax error, insert ";" to complete Statement line 21 Java Problem
Syntax error, insert ")" to complete MethodInvocation line 21 Java Problem
Syntax error, insert "}" to complete ArrayInitializer line 21 Java Problem
Syntax error, insert "}" to complete Block line 7 Java Problem
Syntax error, insert "}" to complete ClassBody line 7 Java Problem
Syntax error, insert "AssignmentOperator Expression" to complete Expression line 7 Java Problem
Plz help me this is my first mod and i have many more ideas i just have to get the coding down
Im making my first mod but i keep getting errors in eclipse
Btw Im using modloader
package net.minecraft.src;
public class Blockmeat extends BaseMod{
private static final Block Blockmeat = null;
public Blockmeat(){
}
public String Version(){
return "0.1";
int BlockmeatId=100;
ModLoader.RegisterBlock(Blockmeat);
ModLoader.AddRecipe(new ItemStack(Blockmeat, 8), new Object[]{
"MMM", "MMM", "MMM",
Character.valueOf('M'), Item.porkRaw.
Blockmeat.setHardness(0.8F);
Blockmeat.setBlockName("Meatblock");
ModLoader.AddName(Blockmeat, "Meatblock");
}
Then the errors in eclipse
setBlockName cannot be resolved or is not a field line 21 Java Problem
Syntax error on token "public", { expected line 7 Java Problem
Syntax error, insert ";" to complete BlockStatements line 7 Java Problem
Syntax error, insert ";" to complete Statement line 21 Java Problem
Syntax error, insert ")" to complete MethodInvocation line 21 Java Problem
Syntax error, insert "}" to complete ArrayInitializer line 21 Java Problem
Syntax error, insert "}" to complete Block line 7 Java Problem
Syntax error, insert "}" to complete ClassBody line 7 Java Problem
Syntax error, insert "AssignmentOperator Expression" to complete Expression line 7 Java Problem
Plz help me this is my first mod and i have many more ideas i just have to get the coding down
A lot of these are just syntax errors - you're missing semi colons at the end of various lines and other things like that. As far as the setBlockName error, that's because you haven't defined that as a method yet inside the Blockmeat class from what I can see. Are you just trying to add a new block into the game?
Btw Im using modloader
Then the errors in eclipse
Plz help me this is my first mod and i have many more ideas i just have to get the coding down
A lot of these are just syntax errors - you're missing semi colons at the end of various lines and other things like that. As far as the setBlockName error, that's because you haven't defined that as a method yet inside the Blockmeat class from what I can see. Are you just trying to add a new block into the game?
Here's the correct code:
I believe that's it.
Your lacking three " } "