From 007700a6e8b18f731b02f49055308cb301006702 Mon Sep 17 00:00:00 2001 From: kilbith Date: Fri, 18 Sep 2015 00:34:09 +0200 Subject: [PATCH] Fix crash when bucket used pointing air --- nodes.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nodes.lua b/nodes.lua index 1b535d8..c424e85 100644 --- a/nodes.lua +++ b/nodes.lua @@ -111,14 +111,12 @@ if minetest.get_modpath("bucket") then minetest.override_item("bucket:bucket_empty", { on_use = function(itemstack, user, pointed_thing) local inv = user:get_inventory() - local player = user:get_player_name() - - if minetest.get_node(pointed_thing.under).name == "xdecor:cauldron" then + if pointed_thing.type == "node" and minetest.get_node(pointed_thing.under).name == "xdecor:cauldron" then if inv:room_for_item("main", "bucket:bucket_water 1") then itemstack:take_item() inv:add_item("main", "bucket:bucket_water 1") else - minetest.chat_send_player(player, "No enough room in your inventory.") + minetest.chat_send_player(user:get_player_name(), "No room in your inventory to add a filled bucket!") end return itemstack else if original_bucket_on_use then