Jump to content

Recommended Posts

Posted

Found part of my answer on the Minecraft Forums. Was able to just use my own worldgen class to respawn the ore at my desired amount.

 

 

Original Post.

 

I think I more or less know what I need, but lack the over all ability to know how to use it.

What I'm trying to accomplish:

Lower the layer at which Iron Ore spawns and change the number of blocks per vein and veins per chunk.

 

From the BiomeDecorator:

this.ironGen = new WorldGenMinable(Block.oreIron.blockID, ;

and

protected void generateOres()
         MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z));
        if (TerrainGen.generateOre(currentWorld, randomGenerator, ironGen, chunk_X, chunk_Z, IRON))
        this.genStandardOre1(20, this.ironGen, 0, 64);

 

I know what values must be changed:

this.ironGen = new WorldGenMinable(Block.oreIron.blockID, 16);

and:

this.genStandardOre1(8, this.ironGen, 0, 34);

 

Now, I know they're put into/through the ORE_GEN_BUS and that I can @ForgeSubscribe and that I need to write an 'if' to catch the IRON/oreIron(?) when it fires and either over write whats saved, or cancel it and then make 'new'.

 

Unfortunately, I don't know anything else beyond that. Do I make this in its own class and then call it in the main or is it possible to just do it from the main? Would this need to get called/done in the PreInit?

 

  • 1 year later...

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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