Hello im a new modder and i am making a mod that creates a new ore but i am having problems compiling it i get this err when i hit recompile :
== MCP v4.3 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.6.0_26\bin\javac.exe" -g -verbose -classpath "lib/;l
ib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjg
l_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecra
ft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minec
raft\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Avadanan.java:9: illegal start of expression
public String Version(){
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:9: ';' expected
public String Version(){
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:12: illegal start of expressio
n
public static final Item avadananItem = new Item(2000).setItemName("avadananItem
");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:12: illegal start of expressio
n
public static final Item avadananItem = new Item(2000).setItemName("avadananItem
");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:12: ';' expected
public static final Item avadananItem = new Item(2000).setItemName("avadananItem
");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:13: illegal start of expressio
n
public class mod_Avadanan extends BaseMod
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:19: <identifier> expected
avadananItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/aarroonn789/a
vadananitem.png");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:20: <identifier> expected
ModLoader.AddName(avadananItem, "Avadanan");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:20: <identifier> expected
ModLoader.AddName(avadananItem, "Avadanan");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:20: illegal start of type
ModLoader.AddName(avadananItem, "Avadanan");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:22: reached end of file while
parsing
}→
^
11 errors
==================
> Done in 2.34 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
in my mod_Avadanan i have this:
package net.minecraft.src;
public class mod_Avadanan extends BaseMod {
public static final Block avadananOre = new BlockAvadananOre(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("avadananOre");
public mod_Avadanan(){
ModLoader.RegisterBlock(avadananOre);
avadananOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/aarroonn789/avadananore.png");
ModLoader.AddName(avadananOre, "Avadanan Ore");
public String Version(){
return "1.7_03";
}
public static final Item avadananItem = new Item(2000).setItemName("avadananItem");
public class mod_Avadanan extends BaseMod
{
public static final Block avadananOre = new BlockEmeraldOre(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("avadananOre");
public static final Block avadananBlock = new BlockEmerald(98, 0).setHardness(1.5F).setResistance(5.0F).setBlockName("avadananBlock");
public static final Item avadananItem = new Item(2000).setItemName("avadananItem");
avadananItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/aarroonn789/avadananitem.png");
ModLoader.AddName(avadananItem, "Avadanan");
}
I have two other files but they are fine this one it the broken one i also have a png in a folder called aarroonn789 that is avadananore.png and avadanitem.png
im a noob at modding so don't expect a lot of me thanks for helping
P.S. im useing modloader
You code was jumbled as hell. I edited you mod_File.java But i just woke up and the code in the op was so unorganized.
package net.minecraft.src;
public class mod_Avadanan extends BaseMod {
public static final Block avadananOre = new BlockAvadananOre(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("avadananOre");
public static final Item avadananItem = new Item(2000).setItemName("avadananItem");
public static final Block avadananOre = new BlockEmeraldOre(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("avadananOre");
public static final Block avadananBlock = new BlockEmerald(98, 0).setHardness(1.5F).setResistance(5.0F).setBlockName("avadananBlock");
public static final Item avadananItem = new ItemAvadanan(2000, 0).setItemName("avadananItem");
public mod_Avadanan()
{
ModLoader.RegisterBlock(avadananOre);
avadananOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/aarroonn789/avadananore.png");
ModLoader.AddName(avadananOre, "Avadanan Ore");
avadananItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/aarroonn789/avadananitem.png");
ModLoader.AddName(avadananItem, "Avadanan");
}
public String Version()
{
return "1.7_03";
}
}
Also is this the only file you have. Do you have a BlockEmerald.java or an ItemAvadanan.java?
**** this. Im tired and theres so many more errors. Read some tutorials some more
Edit: Sorry i seem rude,keep in mind i just woke up. I went to edit your file, and when i posted it I noticed a shitload of more errors. So i suggest following alot more tutorials before you start making your mod.Heres a happy face to make up for my rudeness :biggrin.gif:
Ok i got it down to 3 errors i changed the mod_avadanan sohere it is:
package net.minecraft.src;
public class mod_Avadanan extends BaseMod {
public static final Block avadananOre = new BlockAvadananOre(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("avadananOre");
public mod_Avadanan(){
ModLoader.RegisterBlock(avadananOre);
ModLoader.AddName(avadananOre, "Avadanan Ore");
}
public String Version(){
return "1.7_03";
}
public static final Item avadananItem = new Item(2000).setItemName("avadananItem");
public class mod_Avadanan extends BaseMod
{
public static final Block avadananOre = new BlockEmeraldOre(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("avadananOre");
public static final Block avadananBlock = new BlockEmerald(98, 0).setHardness(1.5F).setResistance(5.0F).setBlockName("avadananBlock");
public static final Item avadananItem = new Item(2000).setItemName("avadananItem");
ModLoader.AddName(avadananItem, "Avadanan");
}
}
and here is the errors
== MCP v4.3 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.6.0_26\bin\javac.exe" -g -verbose -classpath "lib/;l
ib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjg
l_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecra
ft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minec
raft\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Avadanan.java:19: <identifier> expected
ModLoader.AddName(avadananItem, "Avadanan");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:19: <identifier> expected
ModLoader.AddName(avadananItem, "Avadanan");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:19: illegal start of type
ModLoader.AddName(avadananItem, "Avadanan");
^
3 errors
==================
> Done in 2.17 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
there is probably something im missing that is obvious to you guys but im a noob so i need help
Ok i got it down to 3 errors i changed the mod_avadanan sohere it is:
package net.minecraft.src;
public class mod_Avadanan extends BaseMod {
public static final Block avadananOre = new BlockAvadananOre(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("avadananOre");
public mod_Avadanan(){
ModLoader.RegisterBlock(avadananOre);
ModLoader.AddName(avadananOre, "Avadanan Ore");
}
public String Version(){
return "1.7_03";
}
public static final Item avadananItem = new Item(2000).setItemName("avadananItem");
public class mod_Avadanan extends BaseMod
{
public static final Block avadananOre = new BlockEmeraldOre(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("avadananOre");
public static final Block avadananBlock = new BlockEmerald(98, 0).setHardness(1.5F).setResistance(5.0F).setBlockName("avadananBlock");
public static final Item avadananItem = new Item(2000).setItemName("avadananItem");
ModLoader.AddName(avadananItem, "Avadanan");
}
}
and here is the errors
== MCP v4.3 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.6.0_26\bin\javac.exe" -g -verbose -classpath "lib/;l
ib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjg
l_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecra
ft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minec
raft\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Avadanan.java:19: <identifier> expected
ModLoader.AddName(avadananItem, "Avadanan");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:19: <identifier> expected
ModLoader.AddName(avadananItem, "Avadanan");
^
src\minecraft\net\minecraft\src\mod_Avadanan.java:19: illegal start of type
ModLoader.AddName(avadananItem, "Avadanan");
^
3 errors
==================
> Done in 2.17 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
there is probably something im missing that is obvious to you guys but im a noob so i need help
tx,
aarroonn789
I edited your code, but then realized you would never learn anything if other people do it for you. You have duplicate constructors(in wrong places for that matter), overlapping ids, and you put public String Version in your public mod_Avadanan which it should go outside of.
My best suggestion is start over and follow a good tutorial step by step, and never, EVER, copy and paste. Only copy/paste when its your own code, but stlll it helps to type things out.
You have duplicate constructors(in wrong places for that matter), overlapping ids, and you put public String Version in your public mod_Avadanan which it should go outside of.
Unless my glasses are on crooked, there's even a duplicate class definition.
There is nothing wrong with Copy/Paste if you follow these steps:
If I had a dollar for every time a teammate copy/pasted code and then couldn't support the damn stuff because they didn't understand it, I'd have a lot of dollars. :laugh.gif:
If I had a dollar for every time a teammate copy/pasted code and then couldn't support the damn stuff because they didn't understand it, I'd have a lot of dollars. :laugh.gif:
True. But I copy/paste code I wrote, so I don't run into that problem.
Yeah, I omitted that part of DoomHobo's comment to save on electrons. :wink.gif:
We all copy our own code, I meant copy/paste on other's code.
I remember when i was ten, trying to make mods for things, (not minecraft i dont think it was around then)
And i copy and pasted everything, and i realized i didn't understand a single bit of it.
I honestly hope all the modders attempting to mod with these errors, ARE ten. I think it was a valuable learning experience, and then i didn't copy and paste now :biggrin.gif: . If these copy pasters are 13 or so, where they have enough brain by now to understand code, well then they're a couple years off.
I hope you "youngsters" realize how good you have it.
I come from a family of computer professionals (my mom was a programmer, my stepfather a programmer, my dad an electronics engineer), and I was 12 the first time I _saw_ a computer. It was 1972, and I got to see through a window an IBM mainframe.
:laugh.gif:
I hope you "youngsters" realize how good you have it.
I come from a family of computer professionals (my mom was a programmer, my stepfather a programmer, my dad an electronics engineer), and I was 12 the first time I _saw_ a computer. It was 1972, and I got to see through a window an IBM mainframe.
:laugh.gif:
What was your first computer? Mine was a Franklin ACE, released in 1982 I think.
What was your first computer? Mine was a Franklin ACE, released in 1982 I think.
Im like 13, my first computer was an old Dell Dimension Tower, dont remember the rest of the name or anything, or if thats what it was called. i got it when i was seven.
ok i followed a new tutorial and have this in my mod_Avadanan file:
package net.minecraft.src;
import java.util.Random;
public class mod_Avadanan extends BaseMod{
public mod_Avadanan() {
ModLoader.RegisterBlock( AvadananOre );
ModLoader.AddName ( AvadananOre, "avadananore" );
AvadananOre.blockIndexInTexture= ModLoader.addOverride ("/terrain.png", "/aarroonn789/avadanan/avadananore.png");
ModLoader.AddSmelting(AvadananOre.blockID, new ItemStack(AvadananIngot, 1));
ModLoader.AddName ( AvadananIngot, "Avadanan Ingot" );
}
public void GenerateSurface(World world, Random random, int i, int j)
{
for ( int a = 0; a<20; a++ )
{
int posX = i + random.nextInt(16);
int posY = random.nextInt(190);
int posZ = j + random.nextInt(16);
(new WorldGenMinable(AvadananOre.blockID, 12)).generate(world, random, posX, posY, posZ);
}
}
public String Version(){
return "1.7.3";
}
public static final Block AvadananOre;
public static final Item AvadananIngot = new Item(501).setItemName("AvadananIngot");
AvadananIngot.iconIndex = ModLoader.addOverride ("/gui/items.png", "/aarroonn789/avadanan/avadananingot.png");
static{
AvadananOre = (new Block(500, 0, Material.rock)) .setHardness(0.3f).setStepSound(Block.soundStoneFootstep).setBlockName("AvadananOre");
}
}
AND I GET 1 error ONLY 1 here it is
== MCP v4.3 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.6.0_26\bin\javac.exe" -g -verbose -classpath "lib/;l
ib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjg
l_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecra
ft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minec
raft\src\*.java conf/patches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Avadanan.java:29: <identifier> expected
AvadananIngot.iconIndex = ModLoader.addOverride ("/gui/items.png", "/aarroonn789
/avadanan/avadananingot.png");
^
1 error
==================
> Done in 2.06 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Im really confused at what it means because it was in the tutorial and it worked for everyone else that followed it.?!?
in my mod_Avadanan i have this:
I have two other files but they are fine this one it the broken one i also have a png in a folder called aarroonn789 that is avadananore.png and avadanitem.png
im a noob at modding so don't expect a lot of me thanks for helping
P.S. im useing modloader
thanks,
aarroonn789
You're missing a right brace ("}"). mod_Avadanan has an opening brace, but none closing it.
My guess is that you want it to look like this:
You code was jumbled as hell. I edited you mod_File.java But i just woke up and the code in the op was so unorganized.
Also is this the only file you have. Do you have a BlockEmerald.java or an ItemAvadanan.java?
**** this. Im tired and theres so many more errors. Read some tutorials some more
Edit: Sorry i seem rude,keep in mind i just woke up. I went to edit your file, and when i posted it I noticed a shitload of more errors. So i suggest following alot more tutorials before you start making your mod.Heres a happy face to make up for my rudeness :biggrin.gif:
Read my post above
and here is the errors
there is probably something im missing that is obvious to you guys but im a noob so i need help
tx,
aarroonn789
I edited your code, but then realized you would never learn anything if other people do it for you. You have duplicate constructors(in wrong places for that matter), overlapping ids, and you put public String Version in your public mod_Avadanan which it should go outside of.
My best suggestion is start over and follow a good tutorial step by step, and never, EVER, copy and paste. Only copy/paste when its your own code, but stlll it helps to type things out.
Need more coffee? :smile.gif:
This is a class declaration (which was duplicated):
public class mod_Avadanan extends BaseMod
This is a constructor (only saw one):
public mod_Avadanan()
Yes, yes i do. :biggrin.gif:
I meant something else. I cant think of it, imma just call it an item definition. I found two for the same item
Theres two of these:
and i dont even think that line of code is right.
Unless my glasses are on crooked, there's even a duplicate class definition.
Amen. Copypasta programmers learn nothing.
yep yep look above
There is nothing wrong with Copy/Paste if you follow these steps:
1. Learn Java
2. Use copy/paste when helpful
If you switch those two steps, that's another thing entirely!
If I had a dollar for every time a teammate copy/pasted code and then couldn't support the damn stuff because they didn't understand it, I'd have a lot of dollars. :laugh.gif:
True. But I copy/paste code I wrote, so I don't run into that problem.
Yeah, I omitted that part of DoomHobo's comment to save on electrons. :wink.gif:
We all copy our own code, I meant copy/paste on other's code.
I remember when i was ten, trying to make mods for things, (not minecraft i dont think it was around then)
And i copy and pasted everything, and i realized i didn't understand a single bit of it.
I honestly hope all the modders attempting to mod with these errors, ARE ten. I think it was a valuable learning experience, and then i didn't copy and paste now :biggrin.gif: . If these copy pasters are 13 or so, where they have enough brain by now to understand code, well then they're a couple years off.
I come from a family of computer professionals (my mom was a programmer, my stepfather a programmer, my dad an electronics engineer), and I was 12 the first time I _saw_ a computer. It was 1972, and I got to see through a window an IBM mainframe.
:laugh.gif:
What was your first computer? Mine was a Franklin ACE, released in 1982 I think.
Im like 13, my first computer was an old Dell Dimension Tower, dont remember the rest of the name or anything, or if thats what it was called. i got it when i was seven.
AND I GET 1 error ONLY 1 here it is
Im really confused at what it means because it was in the tutorial and it worked for everyone else that followed it.?!?
tx,
aarroonn789
AND I DIDDNT AND DONT (anymore) CopY & tHeN PastE