Page 1 of 1

Generating Floating Lands via register_ore

PostPosted: Sun Jun 29, 2014 20:33
by DevynCJohnson
I am dabbling with the Minetest API to try out making various types of mods. I am try to make some floating nodes for the purpose of later making a space biome. I am using "minetest.register_ore" to try to make some random Desert Stone (default:desert_stone) form in "air" nodes. However, I never see any desert stone in the sky. Does "register_ore" not permit me to use "air" or is there a better way to do this? By the way, no errors appear on th screen or in the log.

Here is the Lua file -

--Testing--
--by Devyn Collier Johnson (DevynCJohnson@Gmail.com)
--WTFPL 2014

minetest.register_ore({
ore_type = "sheet",
ore = "default:desert_stone",
wherein = "air",
clust_scarcity = 10*10*10,
clust_num_ores = 40,
clust_size = 40,
height_min = 20,
height_max = 22,
})

Re: Generating Floating Lands via register_ore

PostPosted: Sun Jun 29, 2014 20:41
by Casimir
Try a wider range for height_min and height_max, those define the y coordinates between which you will find the ore. E.g.:
height_min = 0,
height_max = 1000,

Re: Generating Floating Lands via register_ore

PostPosted: Sun Jun 29, 2014 20:49
by DevynCJohnson
Casimir wrote:Try a wider range for height_min and height_max, those define the y coordinates between which you will find the ore. E.g.:
height_min = 0,
height_max = 1000,


Okay, I tried that. However, Minetest crashes without leaving error messages in the logs. Is there a better way I can do this?

Re: Generating Floating Lands via register_ore

PostPosted: Sun Jun 29, 2014 20:59
by Calinou
You're using a huge clust_size, it should be something like 10 at most.

Note that even if this succeeds, your islands will be perfect cubes…

Re: Generating Floating Lands via register_ore

PostPosted: Sun Jun 29, 2014 21:10
by DevynCJohnson
Calinou wrote:You're using a huge clust_size, it should be something like 10 at most.

Note that even if this succeeds, your islands will be perfect cubes…


Thanks! That helped. I also had to change "sheet" to "scatter", otherwise Minetest would crash. So, is "sheet" unstable?