7 offset
= -10, scale
= 0,
8 spread
= {x
=80, y
=80, z
=80},
9 octaves
= 0, persist
= 0 },
11 offset
= -180, scale
= 10, seed
=rocksl
.GetNextSeed(),
12 spread
= {x
=80, y
=80, z
=80},
13 octaves
= 2, persist
= 0.7 },
14 primary
={ name
="rocks:basalt" },
16 stats
={ count
=0, total
=0, node
={}, totalnodes
=0 },
20 -- Basalt Ex/Mafic hard same as diorite, byt limit=0.5
21 minetest
.register_node( "rocks:basalt", {
22 description
= S("Basalt"),
23 tiles
= { "rocks_Basalt.png" },
24 groups
= {cracky
=3, stone
=1},
25 is_ground_content
= true, sounds
= default
.node_sound_stone_defaults(),
29 minetest
.register_node( "rocks:granite", {
30 description
= S("Granite"),
31 tiles
= { "rocks_Granite.png" },
32 is_ground_content
= true, sounds
= default
.node_sound_stone_defaults(),
33 groups
= {cracky
=3, stone
=1},
35 minetest
.register_node( "rocks:diorite", {
36 description
= S("Diorite"),
37 tiles
= { "rocks_Diorite.png" },
38 groups
= {cracky
=3, stone
=1},
39 is_ground_content
= true, sounds
= default
.node_sound_stone_defaults(),
41 minetest
.register_node( "rocks:gabbro", {
42 description
= S("Gabbro"),
43 tiles
= { "rocks_Gabbro.png" },
44 groups
= {cracky
=3, stone
=1},
45 is_ground_content
= true, sounds
= default
.node_sound_stone_defaults(),
48 local reg
=function(name
,param
)
49 rocksl
.register_stratus(ign
,name
,param
)
51 rocks
.register_igneous_stratus
=reg
54 reg("rocks:granite", { spread
=40, height
=32, treshold
=0.06})
55 reg("rocks:diorite", { spread
=40, height
=32, treshold
=0.23})
56 reg("rocks:gabbro", { spread
=40, height
=32, treshold
=0.36})
61 local regv
=function(name
,param
)
62 rocksl
.register_vein(ign
.veins
,name
,param
)
64 rocks
.register_vein
=regv
66 rocks
.register_vein("default:nyancat",{
67 wherein
={"rocks:granite"},
69 radius
={ average
=10, amplitude
=4, frequency
=8 },
71 rarity
=0.0025, -- this^3*mapblock_volume veins per mapblock
73 { ore
="default:sand", percent
=30 },
74 { ore
="default:dirt", percent
=30 },
79 minetest
.register_on_generated(function(minp
, maxp
, seed
)
80 rocksl
.layergen(ign
,minp
,maxp
,seed
)
81 rocksl
.veingen(ign
.veins
,minp
,maxp
,seed
)
84 minetest
.register_on_shutdown(function()
85 if (ign
.stats
.count
==0) then rocksl
.print("[rocks](ign) stats not available, no chunks generated") return end
86 rocksl
.print("[rocks](ign) generated total "..ign
.stats
.count
.." chunks in "..ign
.stats
.total
.." seconds ("..(ign
.stats
.total
/ign
.stats
.count
).." seconds per "..ign
.stats
.side
.."^3 chunk)")
87 for name
,total
in pairs(ign
.stats
.node
) do
88 rocksl
.print("[rocks](ign) "..name
..": "..total
.." nodes placed ("..(total
*100)/(ign
.stats
.totalnodes
).." %)")