Realistic Terrain Generation

Realistic Terrain Generation

3M Downloads

Natura only spawns Blueberry bushes

Claycorp opened this issue ยท 7 comments

commented

I've been using RTG in a pack lots lately and I noticed a big difference in BoP worlds and vanilla with Natura installed.

BoP worlds spawn all Natura berries and are quite easy to find. They also spawn in biomes that seem to match the temp descriptions.

Now with RTG you will find bushes but they always are blueberries. Savana? Blueberries. Forest? Blueberries.. Swamp? Blueberries... Snowy biomes? Blueberries.... I have yet to find anything but the damn things. It seems like something changed and the only thing I can think of is the bushes spawn off biome temps and RTG changes them all to the Blueberry range.

It would be great if you could somehow get the things to spawn again. Perhaps replace some of the shrubs in some biomes with bushes if Natura is installed?

commented

We'll look into this, but I know for a fact that RTG doesn't change the biome's temperatures. It doesn't change antyhing about the underlying biome at all (from a code perspective anyway).

But there might be something else going on.

commented

Thanks for looking into it ๐Ÿ‘

commented

This does appear to be a bug.

I haven't checked yet, but I suspect it's related to the way Natura checks biomes - if it's using a .equals() or == operator on the biome itself, that's probably what's happening. If so, we'll need to figure out a way to get it to check against biome ID, or if that's not possible, then manually generating the bushes.

commented

https://github.com/progwml6/Natura/blob/779621d5ba267d20cbf490f11177a0f0b811866c/src/main/java/mods/natura/worldgen/BerryBushGen.java#L188

https://github.com/progwml6/Natura/blob/779621d5ba267d20cbf490f11177a0f0b811866c/src/main/java/mods/natura/worldgen/BerryBushGen.java#L197

Those two lines are where it determines which type of berry bush to generate.

The 'metaoffset' logic looks peculiar. I haven't looked at it properly yet, but it looks like there might be a strong bias towards the same type of berry being generated.

commented

To resolve a recent issue with Battle Towers, we had to re-assign each realistic biome's 'biomeName' property after it was instantiated because it was getting set to null somewhere along the way.

Maybe we need to do the same with temp & rain values.

commented

Confirmed by turning up berry prevalence in natura.cfg (I:"<type>berry Spawn Rarity"=4) and turning off only blueberry spawning. No other berries spawned in RTG worlds, but spawned fine in vanilla and BoP world types.

The problem (without digging into RTG code to confirm.. too tired ATM :P ) is likely to do with biome temperature and rainfall. Those seem to be the only factors involved in Natura chosing to place a berry bush: https://github.com/progwml6/Natura/blob/779621d5ba267d20cbf490f11177a0f0b811866c/src/main/java/mods/natura/worldgen/BaseCropWorldgen.java#L63

I'm placing my bet on rainfall.

Natura:BerryBush Temperature and Rainfall values for reference:

Berry Min Temp Max Temp Min Rain Max Rain
Raspberry 0.6f 2.0f 0.2f 0.93f
Blueberry 0.3f 0.81f 0.3f 0.8f
Blackberry 0.5f 5.0f 0.6f 3.0f
Maloberry 0.0f 0.3f 0.0f 5.0f

Natura:BerryBush meta values for reference:

Berry Small Medium Large Large+ripe
raspberry 0 4 8 12
blueberry 1 5 9 13
blackberry 2 6 10 14
maloberry 3 7 11 15
commented

Fixed in fbf4cdc

Berries galore!!! ๐Ÿ˜„

@srs-bsns Thanks for the detailed info - it was a massive help. ๐Ÿ‘