mirror of
https://notabug.org/TenPlus1/lucky_block.git
synced 2024-11-19 23:43:44 +01:00
add entity check
This commit is contained in:
parent
b8a76a23b7
commit
8c5ee06a06
@ -271,8 +271,8 @@ minetest.register_abm({
|
||||
minetest.sound_play("default_tool_breaks", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 10
|
||||
})
|
||||
max_hear_distance = 5
|
||||
}, true)
|
||||
|
||||
local b_no = math.random(#lucky_block.wellblocks)
|
||||
local item = lucky_block.wellblocks[b_no][1]
|
||||
@ -289,12 +289,14 @@ minetest.register_abm({
|
||||
z = pos.z + math.random(-7, 7)
|
||||
}, "__builtin:falling_node")
|
||||
|
||||
if obj and obj:get_luaentity() then
|
||||
obj:get_luaentity():set_node(nod)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
break
|
||||
end
|
||||
end
|
||||
end,
|
||||
end
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user