Page 1 of 1

Liquids on mapgen

PostPosted: Sun Mar 08, 2015 19:55
by Don
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.

Re: Liquids on mapgen

PostPosted: Sun Mar 08, 2015 23:38
by paramat
An ABM on oil that does 'nodeupdate(pos)' might work.

Re: Liquids on mapgen

PostPosted: Mon Mar 09, 2015 00:27
by Don
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

Re: Liquids on mapgen

PostPosted: Mon May 11, 2015 15:55
by Gael de Sailly
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.

Re: Liquids on mapgen

PostPosted: Mon May 11, 2015 18:25
by paramat
^ Yes place oil using mapgen-object voxelmanip, then use that code at the end including update_liquids().