Dunno why you're making it static, or half the crap in there.
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_GreenOre extends BaseMod
{
public mod_GreenOre()
{
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i = 0; i < 98; i++)
{
int randPosX = i + rand.nextInt(16);
int randPosY = rand.nextInt(128);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, rand, randPosX, randPosY, randPosZ);
}
public void GenerateNether(World world, Random random, int i, int j)
{
}
public String Version()
{
return "1";
}
}
You'll have to edit that a bit to use your block though.
I got 11 errors when i tried it :
all of them are the same except 2?
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: illegal start of ex
pression
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: illegal start of ex
pression
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: not a statement
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: <identifier> expect
ed
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: not a statement
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:28: error: illegal start of ex
pression
public String Version()
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:28: error: ';' expected
public String Version()
^
11 errors
1 warning
==================
> Done in 1.30 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
now:
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
then?:
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)}
public class mod_GreenOre extends BaseMod
{
public mod_GreenOre()
{
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i = 0; i < 98; i++)
{
int randPosX = i + rand.nextInt(16);
int randPosY = rand.nextInt(128);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, rand, randPosX, randPosY, randPosZ);
}
public void GenerateNether(World world, Random random, int i, int j)}
{
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: illegal start of ex
pression
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: illegal start of ex
pression
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: not a statement
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: <identifier> expect
ed
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: not a statement
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)}
^
9 errors
1 warning
==================
> Done in 1.39 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_GreenOre.java:21: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, rand, randPosX, ra
ndPosY, randPosZ);
^
1 error
1 warning
==================
> Done in 6.77 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_testblock extends BaseMod
{
public static final Block blck;
public String Version() {
return " - made with har_j1's Mod Maker";
}
static {
blck = (new Blockblck(117)).setBlockName("test");
}
public mod_testblock() {
ModLoader.RegisterBlock(mod_testblock.blck);
ModLoader.AddName(mod_testblock.blck, "Rainbow Block");
mod_testblock.blck.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mymod/blocktest.png");
mod_testblock.blck.setStepSound(Block.soundWoodFootstep);
ModLoader.AddRecipe(new ItemStack(mod_testblock.blck, 1), new Object[] {
"DDD", "D D", "DDD", Character.valueOf('D'), Block.dirt
});
}
public void GenerateSurface(World world, Random random, int i, int j) {
}
public void GenerateNether(World world, Random random, int i, int j) {
}
}
Blockblck:
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class Blockblck extends Block
{
protected Blockblck(int i)
{
super (i,0, Material.wood );
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1F, 1.0F);
setHardness(0.3F);
setLightValue(0F);
}
public int idDropped(int i, Random random)
{
return 117;
}
public int quantityDropped(Random random)
{
return 1;
}
}
mod_testblock:
[spoiler]
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_testblock extends BaseMod
{
public static final Block blck;
public String Version() {
return " - made with har_j1's Mod Maker";
}
static {
blck = (new Blockblck(117)).setBlockName("test");
}
public mod_testblock() {
ModLoader.AddRecipe(new ItemStack(mod_testblock.blck, 1), new Object[] {
"DDD", "D D", "DDD", Character.valueOf('D'), Block.dirt
});
}
public void GenerateSurface(World world, Random random, int i, int j) {
}
public void GenerateNether(World world, Random random, int i, int j) {
}
}
[/spoiler]
Blockblck:
[spoiler]
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class Blockblck extends Block
{
protected Blockblck(int i)
{
super (i,0, Material.wood );
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1F, 1.0F);
setHardness(0.3F);
setLightValue(0F);
}
public int idDropped(int i, Random random)
{
return 117;
}
public int quantityDropped(Random random)
{
return 1;
}
}
[/spoiler]
Please follow the thread guidelines, and place all code within the tags [.code] [./code] (Without the periods)
In the future, please use code tags, it's really annoying when you only use spoiler. Anyway I fixed it up as best I could, I don't know why you're using two mod files so I just combined them.
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_GreenOre extends BaseMod
{
public static final Block blockBlck = (new Blockblck(117)).setBlockName("RainbowBlock").setStepSound(Block.soundWoodFootstep);
public mod_GreenOre()
{
ModLoader.RegisterBlock(blockBlck);
ModLoader.AddName(blockBlck, "Rainbow Block");
blockBlck.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mymod/blocktest.png");
ModLoader.AddRecipe(new ItemStack(blockBlck, 1), new Object[]
{ "DDD", "D D", "DDD", Character.valueOf('D'), Block.dirt });
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i = 0; i < 98; i++)
{
int randPosX = i + rand.nextInt(16);
int randPosY = rand.nextInt(128);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(blockBlck.blockID, 117)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public void GenerateNether(World world, Random random, int i, int j)
{
}
public String Version()
{
return "1";
}
}
ok, so i deleted mod_testblock and pasted the code into Blockblck and got this error:
bad source file?
1 error:
== MCP v4.4 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -source 1.6 -target 1.6 -class
path "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;j
ars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft
\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecra
ft\net\minecraft\src\*.java conf/patches/*.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_GreenOre.java:8: error: cannot access Blockb
lck
public static final Block blockBlck = (new Blockblck(117)).setBlockName("Rainbow
Block").setStepSound(Block.soundWoodFootstep);
^
bad source file: src\minecraft\net\minecraft\src\Blockblck.java
file does not contain class net.minecraft.src.Blockblck
Please remove or make sure it appears in the correct subdirectory of the sourcep
ath.
1 error
1 warning
==================
> Done in 4.52 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_GreenOre extends BaseMod
{
public static final Block blockBlck = (new Blockblck(117)).setBlockName("RainbowBlock").setStepSound(Block.soundWoodFootstep);
public mod_GreenOre()
{
ModLoader.RegisterBlock(blockBlck);
ModLoader.AddName(blockBlck, "Rainbow Block");
blockBlck.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mymod/blocktest.png");
ModLoader.AddRecipe(new ItemStack(blockBlck, 1), new Object[]
{ "DDD", "D D", "DDD", Character.valueOf('D'), Block.dirt });
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i = 0; i < 98; i++)
{
int randPosX = i + rand.nextInt(16);
int randPosY = rand.nextInt(128);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(blockBlck.blockID, 117)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public void GenerateNether(World world, Random random, int i, int j)
{
}
public String Version()
{
return "1";
}
}
Error i get:
== MCP v4.4 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -source 1.6 -target 1.6 -class
path "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;j
ars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft
\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecra
ft\net\minecraft\src\*.java conf/patches/*.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_GreenOre.java:8: error: cannot access Blockb
lck
public static final Block blockBlck = (new Blockblck(117)).setBlockName("Rainbow
Block").setStepSound(Block.soundWoodFootstep);
^
bad source file: src\minecraft\net\minecraft\src\Blockblck.java
file does not contain class net.minecraft.src.Blockblck
Please remove or make sure it appears in the correct subdirectory of the sourcep
ath.
1 error
1 warning
==================
> Done in 4.81 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
== MCP v4.4 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -source 1.6 -target 1.6 -class
path "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;j
ars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft
\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecra
ft\net\minecraft\src\*.java conf/patches/*.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\blockBlck.java:5: error: class Blockblck is publ
ic, should be declared in a file named Blockblck.java
public class Blockblck extends Block
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:8: error: cannot access blockB
lck
public static final Block blockBlck = (new blockBlck(117)).setBlockName("Rainbow
Block").setStepSound(Block.soundWoodFootstep);
^
bad source file: src\minecraft\net\minecraft\src\blockBlck.java
file does not contain class net.minecraft.src.blockBlck
Please remove or make sure it appears in the correct subdirectory of the sourcep
ath.
2 errors
1 warning
==================
> Done in 3.20 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
That's a weird error, never seen that before. Maybe you should save the contents of the file, delete the other, and try adding it again or something. Seems like your project can't find the Blockblck file for some reason.
I got 11 errors when i tried it :
all of them are the same except 2?
== MCP v4.4 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -source 1.6 -target 1.6 -class
path "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;j
ars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft
\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecra
ft\net\minecraft\src\*.java conf/patches/*.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_GreenOre.java:24: error: illegal start of ex
pression
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: illegal start of ex
pression
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: not a statement
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: <identifier> expect
ed
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: not a statement
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:28: error: illegal start of ex
pression
public String Version()
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:28: error: ';' expected
public String Version()
^
11 errors
1 warning
==================
> Done in 1.30 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Oops! My bad, put a closing bracket for generatesurface.
Current code:
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class mod_GreenOre extends BaseMod
{
public mod_GreenOre()
{
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i = 0; i < 98; i++)
{
int randPosX = i + rand.nextInt(16);
int randPosY = rand.nextInt(128);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, rand, randPosX, randPosY, randPosZ);
}
public void GenerateNether(World world, Random random, int i, int j)}
{
}
public String Version();
{
return "1";
}
}
Errors:
== MCP v4.4 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -source 1.6 -target 1.6 -class
path "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;j
ars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft
\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecra
ft\net\minecraft\src\*.java conf/patches/*.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_GreenOre.java:24: error: illegal start of ex
pression
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: illegal start of ex
pression
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: not a statement
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: <identifier> expect
ed
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: not a statement
public void GenerateNether(World world, Random random, int i, int j)}
^
src\minecraft\net\minecraft\src\mod_GreenOre.java:24: error: ';' expected
public void GenerateNether(World world, Random random, int i, int j)}
^
9 errors
1 warning
==================
> Done in 1.39 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
(make sure you copy from my original post not your quoted one)
Sorry, i have no clue :/
ok cool lol i got 1 error but i think it might be about my block,
error:
== MCP v4.4 ==
> Recompiling client...
"C:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -source 1.6 -target 1.6 -class
path "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;j
ars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft
\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecra
ft\net\minecraft\src\*.java conf/patches/*.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_GreenOre.java:21: error: non-static variable
blockID cannot be referenced from a static context
(new WorldGenMinable(Blockblck.blockID, 117)).generate(world, rand, randPosX, ra
ndPosY, randPosZ);
^
1 error
1 warning
==================
> Done in 6.77 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
Paste your block file then.
Blockblck:
[/spoiler]
Please follow the thread guidelines, and place all code within the tags [.code] [./code] (Without the periods)
In the future, please use code tags, it's really annoying when you only use spoiler. Anyway I fixed it up as best I could, I don't know why you're using two mod files so I just combined them.
nope so i delete that and paste the code in blockblck??
bad source file?
1 error:
Needs to go in a file called mod_GreenOre(or whatever you want to change it to.)
The only other file you should have is Blockblck
Current mod_GreenOre code:
Error i get:
That's a weird error, never seen that before. Maybe you should save the contents of the file, delete the other, and try adding it again or something. Seems like your project can't find the Blockblck file for some reason.
EDIT: Glad you figured it out.