fix random tick crash possibility.

This commit is contained in:
trans_soup 2023-10-15 17:38:11 +02:00
parent 24ec93cd50
commit d1a8ad952b
1 changed files with 1 additions and 0 deletions

View File

@ -34,6 +34,7 @@ local function random_tick (mapblock_pos)
local pos = vector.new(x, y, z)
local node_def = minetest.registered_nodes[minetest.get_node(pos).name]
if not node_def then return end
if type(node_def.on_random_tick) == "function" then
node_def.on_random_tick(pos, node, i)
end