Realistic Terrain Generation

Realistic Terrain Generation

3M Downloads

Harder Ores ore flowers do not spawn with RTG/CC 0.5.0

Haggle1996 opened this issue ยท 13 comments

commented

Cross-posting to both trackers.

With Realistic Terrain Generation (since the first 0.5.0 snapshot) and Climate Control, Harder Ores ore flowers do not generate where ores are generated. For that matter, ores do not generate where expected. For example, copper isn't more plentiful in jungle biomes and bauxite isn't generating in swamps. This would at least be workable if the appropriate ore flowers were generated in the vicinity of the related ores; however, neither spawns in relation to each other.

Draco18s/HarderStuff#13

commented

A brief history of RTG ore gen to hopefully shed some light on what's going on...

Because RWG didn't have vanilla biomes, it used its own custom ore gen system, which basically copied what MC does in net.minecraft.world.biome.biomeDecorator.generateOres(). It used forge events, and everything seemed to work fine.

RTG inherited this system, but... because RTG only generates biomes that have already been created/registered... and because RTG calls these biomes' decorate() methods directly when placing them in the world... and because part of that biome decoration process involves generating ores... inhale ... prior to the 0.5.0 snapshots, sometimes RTG would essentially generate ores twice (once via its custom ore gen process & once again when the base biomes decorated themselves).

Then, in 0.5.0, RTG got rid of the legacy custom ore gen system, in favour of letting the biomes (and only the biomes) generate ores themselves, just as they would if they were getting spawned in a non-RTG world.

So that's the first thing that seems a bit strange to me, because... if you're saying that copper normally generates more copper in Jungle biomes, then that should still be the case because the Jungle biome itself (not RTG's version of it, but the actual vanilla Jungle biome itself) is responsible for generating its own ores via its registered biome decorator.

Having said that...

If RTG is to blame at all (and it most certainly could be), then it's probably related to how it's handling the disabling of ores via RTG's configs.

To allow ores to be disabled in RTG, it subscribes to the OreGenEvent.GenerateMinable event, listens for an ore gen event, and 'denies' that event from happening if that particular ore has been disabled in the configs.

As far as I could tell, that was the best way to handle ore gen in RTG, but it's quite possible that I'm either not doing something correctly, or that I've forgotten to include an important aspect of that process, etc, so... maybe @Draco18s could briefly explain how it handles its ore gen, and hopefully between us all, we can figure out a way to resolve this one?

commented

Harder Ores uses Custom Ore Gen by @lawremi to generate it's ore veins.

commented

Correct, all my ores are placed via COG, and when those are placed into the world there is a 0.3 to 0.5% chance (per block) to spawn the indicator flowers on the surface. So it shouldn't matter what system places my ore blocks, so long as they are placed. I still rely heavily on the COG post-chunk-modification event that I had added to COG.

... @Haggle1996 Bonemeal still generates flowers, yes?

commented

I've been testing that trying to figure out if they do or don't. Bonemeal definitely spawns flowers, but they seem to be 'off', meaning, if I bonemeal dirt right on top of a copper vein, but there's an iron vein 50 blocks away, I'm getting iron flowers instead of copper. With BoP worlds, I seem to get what's right nearby. Was in the middle of testing this further when the new Climate Control dropped (used by RTG), so retesting with that version.

commented

Something weird is definitely going on then. But I can't imagine what.

commented

Draco, how does your mod "know" where the surface is? RTG may be running its ore gen before the chunk is placed into the Anvil system to be looked at by normal means. Also, if COG's methods are being suppressed, you're not going to be getting the COG event. We might be able to issue it.

commented

It checks blocks upwards until it finds a block that is getting light from the sky.

commented

BTW, I've disabled all of RTG's ore generation in the configuration file. 100% should be coming from COG.

commented

The release version of COG is not active in RTG worlds. It's a simple condition in the config itself. I will try to release a new version of COG tomorrow.

commented

I suppose I shouldn't tell @lawremi I've been building COG directly from his github repository. :P

commented

FWIW, the configs I use for all these mods are located here.

commented

Finally had some time yesterday and today to sit and do some extensive testing on this issue. I can replicate this problem with a minimal modset using vanilla world gen, without loading RTG and CC, so I'm going to close the RTG side of the issue. My apologies for interrupting @whichonespink44 and @Zeno410's. The confusion for me was Harder Ores/COG generates flowers correctly for vanilla ores, but the mod ores (particularly copper and lead) generate incorrectly. I wrongly assumed, based on random sampling of many maps, instead of a thorough test of each ore, that if it was correct for some flowers, it was correct for all (and the opposite). Continuing with this on @Draco18s thread.

commented

No worries m8 hope yall get to the bottom of it :)