diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index c347efb0a7..a583a0788a 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -132,6 +132,11 @@ function boat.on_punch(self, puncher) -- Drop boat as item on the ground after punching if not minetest.settings:get_bool("creative_mode") then minetest.add_item(self.object:get_pos(), self._itemstring) + else + local inv = puncher:get_inventory() + if not inv:contains_item("main", self._itemstring) then + inv:add_item("main", self._itemstring) + end end self.object:remove() end diff --git a/mods/ENTITIES/mcl_minecarts/init.lua b/mods/ENTITIES/mcl_minecarts/init.lua index e5afcedf68..6454c3ed9a 100644 --- a/mods/ENTITIES/mcl_minecarts/init.lua +++ b/mods/ENTITIES/mcl_minecarts/init.lua @@ -85,6 +85,13 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick) for d=1, #drop do minetest.add_item(self.object:get_pos(), drop[d]) end + elseif puncher and puncher:is_player() then + local inv = puncher:get_inventory() + for d=1, #drop do + if not inv:contains_item("main", drop[d]) then + inv:add_item("main", drop[d]) + end + end end self.object:remove()