BrunoMine
Member
Posts: 1082 Joined: Thu Apr 25, 2013 17:29
GitHub:
BrunoMine
Location: SP-Brasil
Contact:
by BrunoMine » Wed May 22, 2019 15:03
Post
I have used the following methods in a mapblock:
Code: Select all
minetest.forceload_block(pos, true)
minetest.forceload_free_block(pos)
But I noticed that the entities are still active (even though I am very far away), however if I approach and then move away from this mapblock, it becomes inactive.
BrunoMine
Member
Posts: 1082 Joined: Thu Apr 25, 2013 17:29
GitHub:
BrunoMine
Location: SP-Brasil
Contact:
by BrunoMine » Wed May 22, 2019 18:31
Post
This was the only way I found of spawning a mob in an unloaded blocks.
But it is inefficient because it runs ABM and LBMs.
Code: Select all
-- Force spawn
local force_spawn = function(pos, mob_name)
minetest.forceload_block(pos)
minetest.after(3, minetest.add_entity, pos, mob_name)
minetest.after(3, minetest.forceload_free_block, pos)
end
Users browsing this forum: No registered users and 12 guests