1
0
mirror of https://codeberg.org/tenplus1/mobs_monster.git synced 2024-12-23 01:10:26 +01:00

nil check for player when using lava pick

This commit is contained in:
TenPlus1 2020-05-08 20:40:08 +01:00
parent 2fdfd7f84c
commit 674afa91e5
2 changed files with 5 additions and 1 deletions

View File

@ -116,6 +116,9 @@ local old_handle_node_drops = minetest.handle_node_drops
function minetest.handle_node_drops(pos, drops, digger)
-- does player exist?
if not digger then return end
-- are we holding Lava Pick?
if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then
return old_handle_node_drops(pos, drops, digger)

View File

@ -3,7 +3,8 @@ local S = mobs.intllib
-- 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
min_size = min_size or 0.5