Liquids on mapgen

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Liquids on mapgen

by Don » Sun Mar 08, 2015 19:55

I created a mod with oil. When the map generates the source is placed but it does not flow. How do you get it to flow on it's own? If I place a source it will flow no problem.
Is there a trick to it?
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       = "blob",
   ore            = "mystreets:oil_source",
   wherein        = "default:stone",
   clust_scarcity = 60*60*60,
   clust_num_ores = 1024,
   clust_size     = 16,
   height_min     = -31000,
   height_max     = -400,
})



Edit - it just won't do it with ore_type = "blob"
sheet and scatter works fine.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Liquids on mapgen

by paramat » Sun Mar 08, 2015 23:38

An ABM on oil that does 'nodeupdate(pos)' might work.
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Liquids on mapgen

by Don » Mon Mar 09, 2015 00:27

paramat wrote:An ABM on oil that does 'nodeupdate(pos)' might work.

I decided to go with sheet and it seems to be working. I will keep that in mind for next time.
Thanks
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: Liquids on mapgen

by Gael de Sailly » Mon May 11, 2015 15:55

There is also a problem with luminous ores.

Use this :
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_on_generated(function()
   local vm = minetest.get_mapgen_object("voxelmanip")
   vm:calc_lighting()
   vm:update_liquids()
   vm:write_to_map()
end)

(coded fastly, not 100% sure)

It's not very proper code but it's IMO better that a nodeupdate ABM.

It should be added in the engine.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Liquids on mapgen

by paramat » Mon May 11, 2015 18:25

^ Yes place oil using mapgen-object voxelmanip, then use that code at the end including update_liquids().
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron