From 822bedc09a5ff7dd8bf0164e0d42508c6800095c Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 17 Feb 2017 02:47:29 +0100 Subject: [PATCH] Disable collecting items by punching --- mods/ENTITIES/mcl_item_entity/init.lua | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 52f98ea84b..cb7cbad288 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -460,18 +460,7 @@ core.register_entity(":__builtin:item", { end end, - on_punch = function(self, hitter) - local inv = hitter:get_inventory() - if inv and self.itemstring ~= '' then - local left = inv:add_item("main", self.itemstring) - if left and not left:is_empty() then - self.itemstring = left:to_string() - return - end - end - self.itemstring = '' - self.object:remove() - end, + -- Note: on_punch intentionally left out. The player should *not* be able to collect items by punching }) if minetest.setting_get("log_mods") then