mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
Add player object check.
* Handle the case where a mob somehow "clicks" on a composter and we get an invalid player object passed.
This commit is contained in:
parent
8d79d16531
commit
06274518bf
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ local function composter_add_item(pos, node, player, itemstack, pointed_thing)
|
|||
-- handle filling the composter when rightclicked
|
||||
-- as an on_rightclick handles, it returns an itemstack
|
||||
--
|
||||
if not player or player:get_player_control().sneak then
|
||||
if not player or (player:get_player_control() and player:get_player_control().sneak) then
|
||||
return itemstack
|
||||
end
|
||||
if not itemstack and itemstack:is_empty() then
|
||||
|
|
Loading…
Reference in a new issue