diff options
author | orwell <orwell@bleipb.de> | 2025-03-24 22:00:17 +0100 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2025-03-24 22:00:17 +0100 |
commit | 5546dca7825127152558b2982ce47a219456eb34 (patch) | |
tree | 35b06dee00c120f4e589381c879cd2c0d7e17ebd | |
parent | c974e70fde21cb5484e1b19c1f60b82c3ac7f3eb (diff) | |
download | advtrains-5546dca7825127152558b2982ce47a219456eb34.tar.gz advtrains-5546dca7825127152558b2982ce47a219456eb34.tar.bz2 advtrains-5546dca7825127152558b2982ce47a219456eb34.zip |
is_node_loaded: use new function compare_block_status() instead of removed is_block_active()
-rw-r--r-- | advtrains/helpers.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/advtrains/helpers.lua b/advtrains/helpers.lua index 172cf07..e58625f 100644 --- a/advtrains/helpers.lua +++ b/advtrains/helpers.lua @@ -474,7 +474,13 @@ end local active_node_range = tonumber(minetest.settings:get("active_block_range"))*16 + 16 -- Function to check whether node at position(pos) is "loaded"/"active" -- That is, whether it is within the active_block_range to a player -if minetest.is_block_active then -- define function differently whether minetest.is_block_active is available or not +if core.compare_block_status then + -- latest API + function advtrains.is_node_loaded(pos) + return core.compare_block_status(pos, "active") + end +elseif minetest.is_block_active then -- define function differently whether minetest.is_block_active is available or not + -- API added by my PR but later superseded by the above and now removed advtrains.is_node_loaded = minetest.is_block_active else function advtrains.is_node_loaded(pos) |