From 084d1e63b6471b0500c9a6d84ed3fd23c1b3b6d5 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Wed, 24 Feb 2021 18:25:07 +0100 Subject: [PATCH] Fix https://github.com/joe7575/techage_modepack/issues/2 (player inventory not available) --- iron_age/hammer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iron_age/hammer.lua b/iron_age/hammer.lua index 42ee57b..5c5a360 100644 --- a/iron_age/hammer.lua +++ b/iron_age/hammer.lua @@ -29,7 +29,7 @@ local function handler(player_name, node, itemstack, digparams) if ndef then local item = ItemStack(ndef.drop or node.name) local inv = minetest.get_inventory({type="player", name=player_name}) - if inv:room_for_item("main", item) then + if inv and inv:room_for_item("main", item) then local taken = inv:remove_item("main", item) else for _,obj in ipairs(minetest.get_objects_inside_radius(pos, 1)) do