[Answered]Problem with ore generating
2 posters
MC Modding :: Help :: Help
Page 1 of 1
[Answered]Problem with ore generating
Hey people, i started modding yesterday,I've created new ore, and item, but when i try to make ore generating I am getting errors, here is my code:
and errors:
- Code:
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 12; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(46);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Emerald.Emerald.190, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
and errors:
- Code:
2011-10-27 15:14 - commands.__init__ - INFO - == MCP v4.4 ==
2011-10-27 15:14 - commands.__init__ - DEBUG - OS : win32
2011-10-27 15:14 - recompile.main - INFO - > Recompiling client...
2011-10-27 15:14 - commands.recompile - DEBUG - recompile: 'javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java'
2011-10-27 15:14 - commands.recompile - ERROR - javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java failed.
2011-10-27 15:14 - commands.recompile - ERROR - Return code : 1
2011-10-27 15:14 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:1: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - DEBUG - public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
2011-10-27 15:14 - commands.recompile - DEBUG - ^
2011-10-27 15:14 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:3: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - DEBUG - for(int i = 0; i < 12; i++)
2011-10-27 15:14 - commands.recompile - DEBUG - ^
2011-10-27 15:14 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:3: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - DEBUG - for(int i = 0; i < 12; i++)
2011-10-27 15:14 - commands.recompile - DEBUG - ^
2011-10-27 15:14 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:6: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - DEBUG - int randPosY = rand.nextInt(46);
2011-10-27 15:14 - commands.recompile - DEBUG - ^
2011-10-27 15:14 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:7: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - DEBUG - int randPosZ = chunkZ + rand.nextInt(16);
2011-10-27 15:14 - commands.recompile - DEBUG - ^
2011-10-27 15:14 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:8: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - DEBUG - (new WorldGenMinable(mod_Emerald.Emerald.190, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
2011-10-27 15:14 - commands.recompile - DEBUG - ^
2011-10-27 15:14 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:9: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - DEBUG - }
2011-10-27 15:14 - commands.recompile - DEBUG - ^
2011-10-27 15:14 - commands.recompile - DEBUG - 7 errors
2011-10-27 15:14 - commands.recompile - ERROR -
2011-10-27 15:14 - commands.recompile - ERROR - == ERRORS FOUND ==
2011-10-27 15:14 - commands.recompile - ERROR -
2011-10-27 15:14 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:1: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - ERROR - public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
2011-10-27 15:14 - commands.recompile - ERROR - ^
2011-10-27 15:14 - commands.recompile - ERROR -
2011-10-27 15:14 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:3: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - ERROR - for(int i = 0; i < 12; i++)
2011-10-27 15:14 - commands.recompile - ERROR - ^
2011-10-27 15:14 - commands.recompile - ERROR -
2011-10-27 15:14 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:3: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - ERROR - for(int i = 0; i < 12; i++)
2011-10-27 15:14 - commands.recompile - ERROR - ^
2011-10-27 15:14 - commands.recompile - ERROR -
2011-10-27 15:14 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:6: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - ERROR - int randPosY = rand.nextInt(46);
2011-10-27 15:14 - commands.recompile - ERROR - ^
2011-10-27 15:14 - commands.recompile - ERROR -
2011-10-27 15:14 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:7: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - ERROR - int randPosZ = chunkZ + rand.nextInt(16);
2011-10-27 15:14 - commands.recompile - ERROR - ^
2011-10-27 15:14 - commands.recompile - ERROR -
2011-10-27 15:14 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:8: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - ERROR - (new WorldGenMinable(mod_Emerald.Emerald.190, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
2011-10-27 15:14 - commands.recompile - ERROR - ^
2011-10-27 15:14 - commands.recompile - ERROR -
2011-10-27 15:14 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:9: class, interface, or enum expected
2011-10-27 15:14 - commands.recompile - ERROR - }
2011-10-27 15:14 - commands.recompile - ERROR - ^
2011-10-27 15:14 - commands.recompile - ERROR -
2011-10-27 15:14 - commands.recompile - ERROR - 7 errors
2011-10-27 15:14 - commands.recompile - ERROR - ==================
2011-10-27 15:14 - commands.recompile - ERROR -
2011-10-27 15:14 - recompile.main - INFO - > Done in 17.31 seconds
2011-10-27 15:14 - recompile.main - INFO - > Recompiling server...
2011-10-27 15:14 - commands.checksources - WARNING - !! Can not find server sources !!
Last edited by quindo on Thu Oct 27, 2011 6:10 pm; edited 1 time in total
quindo- Member
- Posts : 5
Join date : 2011-10-26
Re: [Answered]Problem with ore generating
this bit
(new WorldGenMinable(mod_Emerald.Emerald.190, 5))
should be this
(new WorldGenMinable(mod_Emerald.Emerald.blockID, 5))
the part blockID doesnt mean you have to put in the id of the block, it means the block is a ...block xD for items you use .shiftedIndex and for blocks you use .blockID
undeceidedt explains this well in one of his youtube videos..
(new WorldGenMinable(mod_Emerald.Emerald.190, 5))
should be this
(new WorldGenMinable(mod_Emerald.Emerald.blockID, 5))
the part blockID doesnt mean you have to put in the id of the block, it means the block is a ...block xD for items you use .shiftedIndex and for blocks you use .blockID
undeceidedt explains this well in one of his youtube videos..
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 30
Location : The netherlands
Re: [Answered]Problem with ore generating
huhh, my bad Thank you for help ;]
quindo- Member
- Posts : 5
Join date : 2011-10-26
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 30
Location : The netherlands
Re: [Answered]Problem with ore generating
I am still having errors ;/
- Code:
2011-10-27 15:52 - commands.__init__ - INFO - == MCP v4.4 ==
2011-10-27 15:52 - commands.__init__ - DEBUG - OS : win32
2011-10-27 15:52 - recompile.main - INFO - > Recompiling client...
2011-10-27 15:52 - commands.recompile - DEBUG - recompile: 'javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java'
2011-10-27 15:52 - commands.recompile - ERROR - javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java failed.
2011-10-27 15:52 - commands.recompile - ERROR - Return code : 1
2011-10-27 15:52 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:1: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - DEBUG - public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
2011-10-27 15:52 - commands.recompile - DEBUG - ^
2011-10-27 15:52 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:3: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - DEBUG - for(int i = 0; i < 12; i++)
2011-10-27 15:52 - commands.recompile - DEBUG - ^
2011-10-27 15:52 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:3: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - DEBUG - for(int i = 0; i < 12; i++)
2011-10-27 15:52 - commands.recompile - DEBUG - ^
2011-10-27 15:52 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:6: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - DEBUG - int randPosY = rand.nextInt(46);
2011-10-27 15:52 - commands.recompile - DEBUG - ^
2011-10-27 15:52 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:7: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - DEBUG - int randPosZ = chunkZ + rand.nextInt(16);
2011-10-27 15:52 - commands.recompile - DEBUG - ^
2011-10-27 15:52 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:8: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - DEBUG - (new WorldGenMinable(mod_Emerald.Emerald.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
2011-10-27 15:52 - commands.recompile - DEBUG - ^
2011-10-27 15:52 - commands.recompile - DEBUG - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:9: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - DEBUG - }
2011-10-27 15:52 - commands.recompile - DEBUG - ^
2011-10-27 15:52 - commands.recompile - DEBUG - 7 errors
2011-10-27 15:52 - commands.recompile - ERROR -
2011-10-27 15:52 - commands.recompile - ERROR - == ERRORS FOUND ==
2011-10-27 15:52 - commands.recompile - ERROR -
2011-10-27 15:52 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:1: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - ERROR - public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
2011-10-27 15:52 - commands.recompile - ERROR - ^
2011-10-27 15:52 - commands.recompile - ERROR -
2011-10-27 15:52 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:3: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - ERROR - for(int i = 0; i < 12; i++)
2011-10-27 15:52 - commands.recompile - ERROR - ^
2011-10-27 15:52 - commands.recompile - ERROR -
2011-10-27 15:52 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:3: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - ERROR - for(int i = 0; i < 12; i++)
2011-10-27 15:52 - commands.recompile - ERROR - ^
2011-10-27 15:52 - commands.recompile - ERROR -
2011-10-27 15:52 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:6: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - ERROR - int randPosY = rand.nextInt(46);
2011-10-27 15:52 - commands.recompile - ERROR - ^
2011-10-27 15:52 - commands.recompile - ERROR -
2011-10-27 15:52 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:7: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - ERROR - int randPosZ = chunkZ + rand.nextInt(16);
2011-10-27 15:52 - commands.recompile - ERROR - ^
2011-10-27 15:52 - commands.recompile - ERROR -
2011-10-27 15:52 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:8: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - ERROR - (new WorldGenMinable(mod_Emerald.Emerald.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
2011-10-27 15:52 - commands.recompile - ERROR - ^
2011-10-27 15:52 - commands.recompile - ERROR -
2011-10-27 15:52 - commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_EmeraldGen.java:9: class, interface, or enum expected
2011-10-27 15:52 - commands.recompile - ERROR - }
2011-10-27 15:52 - commands.recompile - ERROR - ^
2011-10-27 15:52 - commands.recompile - ERROR -
2011-10-27 15:52 - commands.recompile - ERROR - 7 errors
2011-10-27 15:52 - commands.recompile - ERROR - ==================
2011-10-27 15:52 - commands.recompile - ERROR -
2011-10-27 15:52 - recompile.main - INFO - > Done in 1.28 seconds
2011-10-27 15:52 - recompile.main - INFO - > Recompiling server...
2011-10-27 15:52 - commands.checksources - WARNING - !! Can not find server sources !!
quindo- Member
- Posts : 5
Join date : 2011-10-26
Re: [Answered]Problem with ore generating
- Code:
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 12; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(46);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_name1.name2.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
name2 is the name of the block that you are letting generate, so for you probably emerald.
also the code is located in the squiggly brackets starting under the line
public class mod_name extends BaseMod
and OUTSIDE of the {} from public mod_name() {
i hope you can figure it out..
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 30
Location : The netherlands
Re: [Answered]Problem with ore generating
ok, nothing, i findet out whats going on
Last edited by quindo on Thu Oct 27, 2011 6:10 pm; edited 1 time in total (Reason for editing : sorry :P)
quindo- Member
- Posts : 5
Join date : 2011-10-26
Re: [Answered]Problem with ore generating
what was it? i'd like to know for when im gonna try this myself
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 30
Location : The netherlands
Re: [Answered]Problem with ore generating
i forgot about something here is code that don't give errors :
- Code:
package net.minecraft.src;
import java.util.Random;
public class mod_EmeraldGen extends BaseMod
{
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 12; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(46);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Emerald.Emerald.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public String Version()
{
return "1.8.1";
}
}
// }
quindo- Member
- Posts : 5
Join date : 2011-10-26
Similar topics
» [Answered] Help with generating ores
» [answered] Help with crashing
» [Answered] ore mining help
» Mob Texture Problem
» [Answered]Reobfuscate
» [answered] Help with crashing
» [Answered] ore mining help
» Mob Texture Problem
» [Answered]Reobfuscate
MC Modding :: Help :: Help
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum