Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.