Page 1 of 1

Mod Developing

Posted: Wed May 06, 2020 05:16
by MrOverCast
hello


So i am creating a mod with a assortment of random items and things. one of them being aluminum ingots and aluminum tools. i want to make a aluminum ore generate in the world. How would i do that

here is my code so far

Code: Select all

minetest.register_node("aluminum:aluminum_ore", {
       description = "aluminum Ore",
	tiles = {"defaulth_stone.png^aluminum_mineral.png"},
	groups = {cracky = 3, stone = 1},
	drop = 'aluminum:aluminum_lump',
	legacy_mineral = true
})


minetest.register_craftitem("aluminum:aluminum_lump", {
	description = "aluminum Lump",
	inventory_image = "aluminum_Lump.png"
})


minetest.register_ore({
	ore_type       = "vein",
	ore            = "aluminum:aluminum_ore",
	wherein        = "default:stone",
	clust_scarcity = 8*8*8,
	clust_num_ores = 8,
	clust_size     = 3,
	y_min          = -31000,
	y_max          = 64,
})

Re: Mod Developing

Posted: Wed May 06, 2020 17:51
by Andrey01
And what are your questions regarding to the mod development? If you wanted to post the mod, you need to do it here: viewforum.php?f=9

Re: Mod Developing

Posted: Thu May 07, 2020 02:52
by MrOverCast
Andrey01 wrote:
Wed May 06, 2020 17:51
And what are your questions regarding to the mod development? If you wanted to post the mod, you need to do it here: viewforum.php?f=9

like i mentioned in the post i would like to make a ore that generates in the world. how would i do that

Re: Mod Developing

Posted: Thu May 07, 2020 08:36
by Andrey01
As I see, in your code you already registered an ore ("minetest.register_ore" function is applied) that will generate in the world in the depth span from 64 up to -31000 down.

Re: Mod Developing

Posted: Thu May 07, 2020 10:15
by Eran
You are trying to register a 'vein' ore type. For this ore type to work you need to add noise_params and noise_threshold to the ore definition, see here.
However the vein ore type is fairly resource expensive and also hard to control with noise params. You might want to use another ore type instead.

Re: Mod Developing

Posted: Fri May 08, 2020 08:29
by MrOverCast
Eran wrote:
Thu May 07, 2020 10:15
You are trying to register a 'vein' ore type. For this ore type to work you need to add noise_params and noise_threshold to the ore definition, see here.
However the vein ore type is fairly resource expensive and also hard to control with noise params. You might want to use another ore type instead.
Well the problem I am having is when i generate a new world I Don't see my ore i made underground. regarding if its vein or scatter