Generating Floating Lands via register_ore

User avatar
DevynCJohnson
Member
 
Posts: 37
Joined: Sat Jun 28, 2014 00:42
GitHub: DevynCJohnson
In-game: Collier

Generating Floating Lands via register_ore

by DevynCJohnson » Sun Jun 29, 2014 20:33

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,
})
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

Re: Generating Floating Lands via register_ore

by Casimir » Sun Jun 29, 2014 20:41

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,
 

User avatar
DevynCJohnson
Member
 
Posts: 37
Joined: Sat Jun 28, 2014 00:42
GitHub: DevynCJohnson
In-game: Collier

Re: Generating Floating Lands via register_ore

by DevynCJohnson » Sun Jun 29, 2014 20:49

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?
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: Generating Floating Lands via register_ore

by Calinou » Sun Jun 29, 2014 20:59

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…
 

User avatar
DevynCJohnson
Member
 
Posts: 37
Joined: Sat Jun 28, 2014 00:42
GitHub: DevynCJohnson
In-game: Collier

Re: Generating Floating Lands via register_ore

by DevynCJohnson » Sun Jun 29, 2014 21:10

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?
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 10 guests

cron