[solved] register biome problem

[solved] register biome problem

Postby AiTechEye » Sun Mar 17, 2019 12:10 pm

Image

after months of thinking I made the decision to try to create a game from scratch, but now when I adds the first biome, stone covers all grass, why?
using mt 5, newest build

Code: Select all
minetest.register_biome({
   name = "grassland",
   node_top = "default:dirt_with_grass",
   depth_top = 1,
   node_filler = "default:dirt",
   depth_filler = 5,
   node_stone = "default:stone",
--   node_water_top = "",
--   depth_water_top =0 ,
--   node_water = "",
--   node_river_water = "",
   y_min = -31000,
   y_max = 31000,
   heat_point = 50,
   humidity_point = 50,
})


EDIT:
i solved it, by adding minetest.register_alias to each of the nodes, but still why is this required?
minetest.register_alias("mapgen_stone","default:stone")
minetest.register_alias("mapgen_dirt","default:dirt")
minetest.register_alias("mapgen_dirt_with_grass","default:dirt_with_grass")
AiTechEye
Member
 
Posts: 647
Joined: Fri May 29, 2015 9:14 pm
GitHub: AiTechEye

Re: [solved] register biome problem

Postby paramat » Mon Mar 18, 2019 6:32 am

I don't think this is solved.

> minetest.register_alias("mapgen_dirt","default:dirt")
> minetest.register_alias("mapgen_dirt_with_grass","default:dirt_with_grass")

Those 2 aliases shouldn't be necessary, biome surface nodes like grass and dirt only need to be added to a biome registration (unless you use mapgen v6, which i recommend you don't as it doesn't use the Biome API).

When you make a game you need to add a certain number of mapgen aliases, as explained here https://github.com/minetest/minetest/blob/77cfc4fcd1d10d088e8a56e38bc195a5d6fe5e57/doc/lua_api.txt#L282
paramat
Developer
 
Posts: 3358
Joined: Sun Oct 28, 2012 12:05 am
GitHub: paramat

Re: [solved] register biome problem

Postby AiTechEye » Mon Mar 18, 2019 11:10 am

got it, thanks

as you told, only mapgen_stone is needed in this case, without it, it wont work

Image
AiTechEye
Member
 
Posts: 647
Joined: Fri May 29, 2015 9:14 pm
GitHub: AiTechEye



Return to Game Discussion



Who is online

Users browsing this forum: Yandex Bot [Bot] and 0 guests