Adding Diamond Blocks to mapgen.

Adding Diamond Blocks to mapgen.

Postby DoyleChris » Sat Mar 23, 2019 6:55 pm

I am trying to make a mod for my server to add Diamond Blocks to the mapgen like the MESE blocks. But when i go to run it on singleplayer and go to a spot on the map that need to generate, they dont show up. Here is the code any information would be helpful.

Code: Select all
minetest directory\mods\diamond\init.lua


enabled in the config.

Code: Select all
function minetest.register_ores()
   minetest.register_ore({
      ore_type       = "scatter",
      ore            = "default:diamondblock",
      wherein        = "default:stone",
      clust_scarcity = 15 * 15 * 15,
      clust_num_ores = 7,
      clust_size     = 5,
      y_max          = -5000,
      y_min          = -31000,
   })
   end
DoyleChris
Member
 
Posts: 222
Joined: Sat Jul 25, 2015 7:54 pm
In-game: DoyleChris

Re: Adding Diamond Blocks to mapgen.

Postby Nathan.S » Sun Mar 24, 2019 3:16 am

Is there some reason you put your 'minetest.register_ore' code within a function? As far as I know you don't need to do that. Just remove the first and last line in your example code and it will probably work.
Nathan.S
Member
 
Posts: 871
Joined: Wed Sep 24, 2014 5:47 pm
GitHub: NathanSalapat
In-game: NathanS21

Re: Adding Diamond Blocks to mapgen.

Postby v-rob » Sun Mar 24, 2019 5:03 am

What Nathan.S said, as well as ores won't generate in a part of a map that has already been loaded before, if you are doing that.
v-rob
Member
 
Posts: 613
Joined: Thu Mar 24, 2016 3:19 am
GitHub: v-rob

Re: Adding Diamond Blocks to mapgen.

Postby DoyleChris » Sun Mar 24, 2019 11:16 am

Ill try that Nathan.
DoyleChris
Member
 
Posts: 222
Joined: Sat Jul 25, 2015 7:54 pm
In-game: DoyleChris

Re: Adding Diamond Blocks to mapgen.

Postby DoyleChris » Sun Mar 24, 2019 12:18 pm

Well i got rid of the
function minetest.register_ores() and end
but teleporting to a new section of my world it still didnt show up.
I have no idea how to adjust the

clust_scarcity = 15 * 15 * 15,
clust_num_ores = 7,
clust_size = 5,

I have tried making like the iron ore in stone settings but still dosent show up.
DoyleChris
Member
 
Posts: 222
Joined: Sat Jul 25, 2015 7:54 pm
In-game: DoyleChris

Re: Adding Diamond Blocks to mapgen.

Postby paramat » Mon Mar 25, 2019 10:47 pm

Make sure your mod 'depends' on the MTG default mod, to run after it.
paramat
Developer
 
Posts: 3350
Joined: Sun Oct 28, 2012 12:05 am
GitHub: paramat



Return to Modding Discussion



Who is online

Users browsing this forum: Yandex Bot [Bot] and 0 guests