Limiting Ore Generation (EITHER / OR)

Started by GenreShinobi on Fri, 12/23/2016 - 20:56

Topic category: Advanced modding

Last seen on 00:22, 28. Dec 2016
Joined Dec 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Limiting Ore Generation (EITHER / OR)
Sat, 12/24/2016 - 05:24 (edited)

I have a mod that adds several ores to the game. As-is there's ALOT of ore generating. Reducing the rarity isn't exactly how I'd like to approach solving the problem though. I'd like the frequency / quantity in a chunk to remain about the same. I'd like the # of chunks it occurs in to be reduced, by preventing some of the ore from spawning in the same chunk.

Lets say I have 4 Ores. A, B, C, and D.

I'd like to tweak the generation so that it generates EITHER A or B AND C or D. 

Anyone think they can help me accomplish this?

 

Solution:

The conditional I placed in the IWorldGenerator#generate implementation. 

 

New Problem:

How do I apply this new conditional to a vanilla ore, like Iron.

Edited by GenreShinobi on Sat, 12/24/2016 - 05:24
Last seen on 20:14, 7. Dec 2017
Joined Oct 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
You can't apply it to vanilla
Sat, 12/24/2016 - 09:42

You can't apply it to vanilla ores, editing Minecraft's vanilla code is not possible in MCreator because it breaks the Minecraft Terms of Service.

Last seen on 00:22, 28. Dec 2016
Joined Dec 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I've been given a tip on how
Mon, 12/26/2016 - 22:20

I've been given a tip on how to accomlish this without needing to edit source code. I'll revisit this later and share how it turns out.