mirror of
https://notabug.org/TenPlus1/lucky_block.git
synced 2024-10-05 22:23:05 +02:00
fix nil issue with lightning staff
This commit is contained in:
parent
fe094f65ba
commit
9c6e017da7
@ -226,7 +226,7 @@ local function bushy(pos, player)
|
|||||||
|
|
||||||
if obj then
|
if obj then
|
||||||
|
|
||||||
obj:setvelocity({
|
obj:set_velocity({
|
||||||
x = math.random(-10, 10) / 9,
|
x = math.random(-10, 10) / 9,
|
||||||
y = 5,
|
y = 5,
|
||||||
z = math.random(-10, 10) / 9,
|
z = math.random(-10, 10) / 9,
|
||||||
@ -256,7 +256,7 @@ minetest.register_tool("lucky_block:lightning_staff", {
|
|||||||
pos = pointed_thing.above
|
pos = pointed_thing.above
|
||||||
end
|
end
|
||||||
|
|
||||||
local bnod = minetest.get_node_or_nil(pos)
|
local bnod = pos and minetest.get_node_or_nil(pos)
|
||||||
local bref = bnod and minetest.registered_items[bnod.name]
|
local bref = bnod and minetest.registered_items[bnod.name]
|
||||||
|
|
||||||
if bref and bref.buildable_to == true then
|
if bref and bref.buildable_to == true then
|
||||||
|
Loading…
Reference in New Issue
Block a user