I've written the code below but the map generation just doesn't create the biome. Mods with custom biomes written by others (Snow Biome) do seem to work.
I was able to get it to work by adding a depends.txt with default in. Maybe that's the problem? Because unless the biomes are loaded, there aren't any biomes for Minetest to clear. This was with minetest game though.
Amaz wrote:I was able to get it to work by adding a depends.txt with default in. Maybe that's the problem? Because unless the biomes are loaded, there aren't any biomes for Minetest to clear. This was with minetest game though.
That actually indeed did the trick, thanks a lot! <3
Amaz wrote:I was able to get it to work by adding a depends.txt with default in. Maybe that's the problem? Because unless the biomes are loaded, there aren't any biomes for Minetest to clear. This was with minetest game though.
Thank you. It worked for me too!
To be honest, this should be noted at http://dev.minetest.net/minetest.register_biome (It seems that not everyone can edit it)
In the intro http://dev.minetest.net/Intro they say that "depends.txt" is not necessary.
There is no indication that I need this (depends.txt with default). It's counter-intuitive - The game loads everything just fine (dirt with grass, rock etc); there is no an error window. I'm not sure if it's possible but I think we can redefine all nodes/biomes. So why we need "load default" to unload everything in the next second?
Obviously there are reasons but for a new minetest's modder this is weird.
Amaz wrote:I was able to get it to work by adding a depends.txt with default in. Maybe that's the problem? Because unless the biomes are loaded, there aren't any biomes for Minetest to clear. This was with minetest game though.
Thank you. It worked for me too!
To be honest, this should be noted at http://dev.minetest.net/minetest.register_biome (It seems that not everyone can edit it)
In the intro http://dev.minetest.net/Intro they say that "depends.txt" is not necessary.
There is no indication that I need this (depends.txt with default). It's counter-intuitive - The game loads everything just fine (dirt with grass, rock etc); there is no an error window. I'm not sure if it's possible but I think we can redefine all nodes/biomes. So why we need "load default" to unload everything in the next second?
Obviously there are reasons but for a new minetest's modder this is weird.
depends.txt really is not necessary to make a mod, which is what the Intro page is about. If your mod's behavior depends on other mods, then you will need depends.txt, but not all mods do.
The documentation for minetest.clear_registered_biomes says that it clears all biomes currently registered. So you need to ensure that the biomes you want to clear have already been registered when you call it, which you need depends.txt for.
If anything, the warning should go with clear_registered_biomes, not register_biome.
Every time a mod API is left undocumented, a koala dies.
> Because unless the biomes are loaded, there aren't any biomes for Minetest to clear.
That's not the issue, there is an initial fallback biome defined in case none are registered.
What happened is that without a dependency on default, the default mod was run after Kenney's mod and added it's biomes to Kenney's, since Kenney's biome is at heat = 10 is was probably hard to find.
If you clear biomes you need a dependency on default to make that register it's biomes first.