Trying to make an iron boat, I get this when i try to recompile:
== MCP v4.4 ==
> Recompiling client...
javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
craft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/pat
ches/*.java failed.
Return code : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\ItemIronBoat.java:12: error: invalid method decl
aration; return type required
public ItemIronBoat(int i)
^
1 error
1 warning
==================
> Done in 10.68 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Anyone know how to fix the problem?
Any suggestions greatly appreciated
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Since it's in ItemIronBoat.java, I'm pretty sure, my hunch was right. It's kind of weird, that javac doesn't whine for the wrong class name first. It already knows it wont work by the time it gets to
public class ItemIronBoatSomethingElse {
I've tested it earlier today, and it results in the exact same error. :]
Thanks for the help, I found the error, it was in the public class line of ItemIronBoat. I had ItemBIronBoat instead.
After I fixed that, I ran into more errors recompiling
== MCP v4.4 ==
> Recompiling client...
javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
craft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/pat
ches/*.java failed.
Return code : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_boat.java:4: error: mod_boat is not abstract
and does not override abstract method Version() in BaseMod
public class mod_boat extends BaseMod
^
src\minecraft\net\minecraft\src\mod_boat.java:9: error: non-static variable icon
Index cannot be referenced from a static context
ItemIronBoat.iconIndex = ModLoader.addOverride("/gui/items.png", "/ironboat.png"
);
^
src\minecraft\net\minecraft\src\mod_boat.java:10: error: cannot find symbol
ModLoader.AddName(itemIronBoat, ItemIronBoat);
^
symbol: variable ItemIronBoat
location: class mod_boat
src\minecraft\net\minecraft\src\mod_boat.java:11: error: cannot find symbol
ModLoader.AddRecipe(new ItemStack(ItemIronBoat, 1), new Object[] {
^
symbol: variable ItemIronBoat
location: class mod_boat
src\minecraft\net\minecraft\src\mod_boat.java:12: error: cannot find symbol
"#B#", "C#C", Character.valueOf('#'), Block.blockIron, Character.valueOf('C'), I
tem.ingotiron.shiftedIndex
^
symbol: variable blockIron
location: class Block
src\minecraft\net\minecraft\src\mod_boat.java:12: error: cannot find symbol
"#B#", "C#C", Character.valueOf('#'), Block.blockIron, Character.valueOf('C'), I
tem.ingotiron.shiftedIndex
^
symbol: variable ingotiron
location: class Item
src\minecraft\net\minecraft\src\mod_boat.java:17: error: cannot return a value f
rom method whose result type is void
return "3.14159265";
^
7 errors
1 warning
==================
> Done in 12.01 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Thanks for the help, I found the error, it was in the public class line of ItemIronBoat. I had ItemBIronBoat instead.
After I fixed that, I ran into more errors recompiling
== MCP v4.4 ==
> Recompiling client...
javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
craft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/pat
ches/*.java failed.
Return code : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_boat.java:4: error: mod_boat is not abstract
and does not override abstract method Version() in BaseMod
public class mod_boat extends BaseMod
^
src\minecraft\net\minecraft\src\mod_boat.java:9: error: non-static variable icon
Index cannot be referenced from a static context
ItemIronBoat.iconIndex = ModLoader.addOverride("/gui/items.png", "/ironboat.png"
);
^
src\minecraft\net\minecraft\src\mod_boat.java:10: error: cannot find symbol
ModLoader.AddName(itemIronBoat, ItemIronBoat);
^
symbol: variable ItemIronBoat
location: class mod_boat
src\minecraft\net\minecraft\src\mod_boat.java:11: error: cannot find symbol
ModLoader.AddRecipe(new ItemStack(ItemIronBoat, 1), new Object[] {
^
symbol: variable ItemIronBoat
location: class mod_boat
src\minecraft\net\minecraft\src\mod_boat.java:12: error: cannot find symbol
"#B#", "C#C", Character.valueOf('#'), Block.blockIron, Character.valueOf('C'), I
tem.ingotiron.shiftedIndex
^
symbol: variable blockIron
location: class Block
src\minecraft\net\minecraft\src\mod_boat.java:12: error: cannot find symbol
"#B#", "C#C", Character.valueOf('#'), Block.blockIron, Character.valueOf('C'), I
tem.ingotiron.shiftedIndex
^
symbol: variable ingotiron
location: class Item
src\minecraft\net\minecraft\src\mod_boat.java:17: error: cannot return a value f
rom method whose result type is void
return "3.14159265";
^
7 errors
1 warning
==================
> Done in 12.01 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
its the same as the standard ItemBoat.java but with the names changed
"error: non-static variable iconIndex cannot be referenced from a static context"
You're trying to set .iconIndex on the class ItemIronBoat instead of your instance itemIronBoat.
"cannot find symbol ModLoader.AddName(itemIronBoat, ItemIronBoat);"
Your ItemIronBoat in this line needs to be in double quotes.
"error: cannot find symbol ModLoader.AddRecipe(new ItemStack(ItemIronBoat, 1), new Object[] {"
Again, you need to use itemIronBoat, not ItemIronBoat.
"error: cannot find symbol "#B#", "C#C", Character.valueOf('#'), Block.blockIron, Character.valueOf('C'), Item.ingotiron.shiftedIndex"
blockIron should be blockSteel (I have no idea why MCP named it that); ingotiron should be ingotIron.
"cannot return a value from method whose result type is void"
Uh. Not sure on this one. Can you post your mod_IronBoat.java?
I tried to recompile after fixing those and came up with only these
== MCP v4.4 ==
> Recompiling client...
javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
craft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/pat
ches/*.java failed.
Return code : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_ironboat.java:4: error: mod_ironboat is not
abstract and does not override abstract method Version() in BaseMod
public class mod_ironboat extends BaseMod
^
src\minecraft\net\minecraft\src\mod_ironboat.java:17: error: cannot return a val
ue from method whose result type is void
return "3.14159265";
^
2 errors
1 warning
==================
> Done in 12.01 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Here is my mod_ironboat.java:
package net.minecraft.src;
import java.util.Random;
public class mod_ironboat extends BaseMod
{
public static final Item itemIronBoat = new ItemIronBoat(850).setItemName("iboat");
public mod_ironboat()
{
itemIronBoat.iconIndex = ModLoader.addOverride("/gui/items.png", "/ironboat.png");
ModLoader.AddName(itemIronBoat, "ItemIronBoat");
ModLoader.AddRecipe(new ItemStack(itemIronBoat, 1), new Object[] {
"#B#", "C#C", Character.valueOf('#'), Block.blockSteel, Character.valueOf('C'), Item.ingotIron
});
{
return "3.14159265";
}
}
}
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Thanks for the help everyone, it works now. i should of realized about that line. oh well.
Anyone know where to change the texture of the boat when you place it down? and which line of the code you need to modify so it never breaks unless the player hits it a couple of times?
EDIT: i think i found where, in the EntityIronBoat.java file, but dont know what to change it to. not sure if its the right line though
public boolean canBeCollidedWith()
{
return !isDead;
}
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Anyone know how to fix the problem?
Any suggestions greatly appreciated
together they are powerful beyond imagination."
Thanks for the help, I found the error, it was in the public class line of ItemIronBoat. I had ItemBIronBoat instead.
After I fixed that, I ran into more errors recompiling
here's my ItemIronBoat.java
its the same as the standard ItemBoat.java but with the names changed
together they are powerful beyond imagination."
"error: non-static variable iconIndex cannot be referenced from a static context"
You're trying to set .iconIndex on the class ItemIronBoat instead of your instance itemIronBoat.
"cannot find symbol ModLoader.AddName(itemIronBoat, ItemIronBoat);"
Your ItemIronBoat in this line needs to be in double quotes.
"error: cannot find symbol ModLoader.AddRecipe(new ItemStack(ItemIronBoat, 1), new Object[] {"
Again, you need to use itemIronBoat, not ItemIronBoat.
"error: cannot find symbol "#B#", "C#C", Character.valueOf('#'), Block.blockIron, Character.valueOf('C'), Item.ingotiron.shiftedIndex"
blockIron should be blockSteel (I have no idea why MCP named it that); ingotiron should be ingotIron.
"cannot return a value from method whose result type is void"
Uh. Not sure on this one. Can you post your mod_IronBoat.java?
INFORMATION WANTS TO BE WRONG
I tried to recompile after fixing those and came up with only these
Here is my mod_ironboat.java:
together they are powerful beyond imagination."
INFORMATION WANTS TO BE WRONG
Anyone know where to change the texture of the boat when you place it down? and which line of the code you need to modify so it never breaks unless the player hits it a couple of times?
EDIT: i think i found where, in the EntityIronBoat.java file, but dont know what to change it to. not sure if its the right line though
together they are powerful beyond imagination."