From 9990c7937dbc87e577aa9accf30c3daeb3baa13a Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 7 Sep 2024 21:54:32 -0500 Subject: [PATCH] Fix picking up tipped arrows --- mods/ITEMS/mcl_bows/arrow.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index be5b7f68c..cb3561cbd 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -93,8 +93,9 @@ local function stuck_arrow_on_step(self, dtime) for _,obj in ipairs(objects) do if obj:is_player() then if self._collectable and not minetest.is_creative_enabled(obj:get_player_name()) then - if obj:get_inventory():room_for_item("main", "mcl_bows:arrow") then - obj:get_inventory():add_item("main", "mcl_bows:arrow") + local arrow_item = self._arrow_item + if arrow_item and minetest.registered_items[arrow_item] and obj:get_inventory():room_for_item("main", arrow_item) then + obj:get_inventory():add_item("main", arrow_item) minetest.sound_play("item_drop_pickup", { pos = pos, max_hear_distance = 16,