diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-12-03 10:41:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-03 10:41:34 -0500 |
commit | f80ea73bfb668b1999bcc134aaa7fc126724e6d6 (patch) | |
tree | 956a750a4bf25285805fe9a8dcf19526e644f96c /doc/lua_api.txt | |
parent | b3ffc4b327622bec63793476191b95bc174bf33c (diff) | |
download | minetest-f80ea73bfb668b1999bcc134aaa7fc126724e6d6.tar.xz |
Let mods choose a forceload limit (#13002)
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r-- | doc/lua_api.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index e9a95c9e7..e8e32c536 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -6532,12 +6532,16 @@ Misc. * You may want to cache and call the old function to allow multiple mods to change knockback behavior. -* `minetest.forceload_block(pos[, transient])` +* `minetest.forceload_block(pos[, transient[, limit]])` * forceloads the position `pos`. * returns `true` if area could be forceloaded * If `transient` is `false` or absent, the forceload will be persistent (saved between server runs). If `true`, the forceload will be transient (not saved between server runs). + * `limit` is an optional limit on the number of blocks that can be + forceloaded at once. If `limit` is negative, there is no limit. If it is + absent, the limit is the value of the setting `"max_forceloaded_blocks"`. + If the call would put the number of blocks over the limit, the call fails. * `minetest.forceload_free_block(pos[, transient])` * stops forceloading the position `pos` |