mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Add forceloading
This commit is contained in:
@@ -64,6 +64,16 @@ function minetest.hash_node_position(pos)
|
||||
return (pos.z+32768)*65536*65536 + (pos.y+32768)*65536 + pos.x+32768
|
||||
end
|
||||
|
||||
function minetest.get_position_from_hash(hash)
|
||||
local pos = {}
|
||||
pos.x = (hash%65536) - 32768
|
||||
hash = math.floor(hash/65536)
|
||||
pos.y = (hash%65536) - 32768
|
||||
hash = math.floor(hash/65536)
|
||||
pos.z = (hash%65536) - 32768
|
||||
return pos
|
||||
end
|
||||
|
||||
function minetest.get_item_group(name, group)
|
||||
if not minetest.registered_items[name] or not
|
||||
minetest.registered_items[name].groups[group] then
|
||||
|
Reference in New Issue
Block a user