been looking and searching for almost 4 hours. cant find the answer to what seems a simple question...
how do you make an abm "see"an ungenerated map section and issue the code to generate it...
yeah i know code is complex, or takes lots of resources but i am only talking about generating 13x5x1 of map at a time.
I have an abm that moves on its own, when it hits an ungenerated map chunk it is forced to wait for the player so the chunk can be generated. if i bypass this, then when the map is generated it ruins the output of the abm.
i have a screen shot or two...
Generate new (empty) mapchucks when abm reaches them.
Re: Generate new (empty) mapchucks when abm reaches them.
You would need to force load the block.
http://dev.minetest.net/minetest.forceload_block
http://dev.minetest.net/minetest.forceload_block
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
A list of my mods can be found here
Re: Generate new (empty) mapchucks when abm reaches them.
forceloaded ... check... those screenshots were with the forceloaded block
Code: Select all
minetest.env:add_node(newpos, { name="abmtesting:abmroad", param1=lightcount, param2=facing })
minetest.forceload_block(newpos)
abmroad.placetbmroad(newpos, tostring(fuel))
abmroad.setstackcount(newpos, "default:coal_lump", coalcount)
local list = inv:get_list("inv")
local newmeta = minetest.get_meta(newpos)
local inv = newmeta:get_inventory()
inv:set_list("inv", list)
minetest.forceload_free_block(pos)
minetest.env:remove_node(pos)
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Generate new (empty) mapchucks when abm reaches them.
Not sure force-load actually generates chunks, try 'emergeblocks' instead (0.4.13dev).
Re: Generate new (empty) mapchucks when abm reaches them.
@paramat: no dice i even tried generating blocks in front of the abm. i tried one block at a time, 20 blocks at a time. same results grass on my field (or rather random mapgened blocks of stone in my road)
Who is online
Users browsing this forum: No registered users and 8 guests