From b8af8cacd58003d43c58f40f3aad6f522e4062d4 Mon Sep 17 00:00:00 2001 From: kabou Date: Fri, 18 Feb 2022 16:54:07 +0100 Subject: [PATCH] Add player object check. * Add one more check if player object is an actual player. --- mods/ITEMS/mcl_composters/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_composters/init.lua b/mods/ITEMS/mcl_composters/init.lua index 2c95bc71e..5684c2c2b 100644 --- a/mods/ITEMS/mcl_composters/init.lua +++ b/mods/ITEMS/mcl_composters/init.lua @@ -197,7 +197,7 @@ local function composter_harvest(pos, node, player, itemstack, pointed_thing) -- -- handler for harvesting bone meal from a ready composter when rightclicked -- - 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 end -- reset ready type composter to empty type