Page 1 of 1

How can I do oregen in minetest 4.15 ?

PostPosted: Mon Jan 02, 2017 21:15
by Sires
I'm trying a lot to make an ore but I don't know why, I can't.
The code that I'm using now is
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_ore({
   ore_type         = "scatter",
   ore              = "niceblock:niceblock",
   wherein          = "default:air",
   clust_scarcity   = 8*8*8,
   clust_num_ores   = 4,
   clust_size       = 3,
   y_min            = -300,
   y_max            = 100,
   noise_params     = {offset = 0, scale = 1, spread = {x = 100, y = 100, z = 100}, seed = 420, octaves = 3, persist = 0.7},
   noise_threshhold = 0.5,
})

But that doesn't works, I copied and pasted a lot of codes from tutorials, no one worked

Re: How can I do oregen in minetest 4.15 ?

PostPosted: Tue Jan 03, 2017 06:38
by LordNevar
i'm having the same issue.

i placed the code in the default mapgen.lua and it works. but that defeats the purpose.

Re: How can I do oregen in minetest 4.15 ?

PostPosted: Tue Jan 03, 2017 09:44
by Krock
Your mod needs a file called "depends.txt" with the content "default", to make sure your mod is loaded after default. This is important because that mod clears all previously registered ores.

There's also an issue in your code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
   wherein          = "default:air",
should be either
   wherein          = "air",
or more likely
   wherein          = "default:stone",

Re: How can I do oregen in minetest 4.15 ?

PostPosted: Tue Jan 03, 2017 22:04
by paramat
What Krock wrote.

Re: How can I do oregen in minetest 4.15 ?

PostPosted: Fri Jan 06, 2017 00:44
by Sires
Krock wrote:Your mod needs a file called "depends.txt" with the content "default", to make sure your mod is loaded after default. This is important because that mod clears all previously registered ores.

There's also an issue in your code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
   wherein          = "default:air",
should be either
   wherein          = "air",
or more likely
   wherein          = "default:stone",

That worked, thx