Commit 674afa91 authored by TenPlus1's avatar TenPlus1
Browse files

nil check for player when using lava pick

parent 2fdfd7f8
...@@ -116,6 +116,9 @@ local old_handle_node_drops = minetest.handle_node_drops ...@@ -116,6 +116,9 @@ local old_handle_node_drops = minetest.handle_node_drops
function minetest.handle_node_drops(pos, drops, digger) function minetest.handle_node_drops(pos, drops, digger)
-- does player exist?
if not digger then return end
-- are we holding Lava Pick? -- are we holding Lava Pick?
if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then
return old_handle_node_drops(pos, drops, digger) return old_handle_node_drops(pos, drops, digger)
......
...@@ -3,7 +3,8 @@ local S = mobs.intllib ...@@ -3,7 +3,8 @@ local S = mobs.intllib
-- custom particle effects -- custom particle effects
local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow) local effect = function(
pos, amount, texture, min_size, max_size, radius, gravity, glow)
radius = radius or 2 radius = radius or 2
min_size = min_size or 0.5 min_size = min_size or 0.5
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment