Jump to content

(1.8)Issue with world gen


Recommended Posts

I decided to work on my mod again, thing is its it for 1.7.2. So I decided to update it.

I fixed everything, but I'm getting 1 error for the worldgen. This is the line:


(new WorldGenMinable(mainClass.darkOre, 2)).generate(world, random, chunkX, chunkY, chunkZ);

Its saying:

- The constructor WorldGenMinable(Block, int) is undefined

- The method generate(World, Random, BlockPos) in the type WorldGenMinable is not applicable for the arguments (World, Random, int,

I'm still pretty new, but I need some help.

Link to comment
Share on other sites

First, you need to make sure you have a line like this in what ever case of the dimension you are generating it in:

generateSurface(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider);

inside a constructor like this:

public void generate(Random random, int chunkX, int chunkZ, World world,

            IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {



then, you need to generate the ore:

public void generateSurface(Random random, int chunkX, int chunkZ, World world, IChunkProvider ChunkGenerator, IChunkProvider chunkProvider){

for(int i = 0; i < 2; i++){ //rarity

int startX = chunkX * 16 + random.nextInt(16);

int startZ = chunkZ * 16 + random.nextInt(16);

int startY = random.nextInt(32) + 16; //height spawning

BlockPos start = new BlockPos(startX, startY, startZ);

(new WorldGenMinable(your block class.your ore.getDefaultState(), random.nextInt(2) + 10)).generate(world, random, start); //vein size and block to generate


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.