From 294be0f30261b8cd2aef807adee934df5500c664 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 9 May 2018 18:19:42 +0200 Subject: [PATCH] Players must be closer to grab arrows --- mods/ITEMS/mcl_bows/arrow.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index ca1ca4b5ea..5b3652b240 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -119,11 +119,11 @@ ARROW_ENTITY.on_step = function(self, dtime) end self._stuckrechecktimer = 0 end - local objects = minetest.get_objects_inside_radius(pos, 2) + -- Pickup arrow if player is nearby (not in Creative Mode) + local objects = minetest.get_objects_inside_radius(pos, 1) for _,obj in ipairs(objects) do if obj:is_player() then if not minetest.settings:get_bool("creative_mode") then - -- Pickup arrow if player is nearby if obj:get_inventory():room_for_item("main", "mcl_bows:arrow") then obj:get_inventory():add_item("main", "mcl_bows:arrow") minetest.sound_play("item_drop_pickup", { @@ -131,13 +131,10 @@ ARROW_ENTITY.on_step = function(self, dtime) max_hear_distance = 16, gain = 1.0, }) - self.object:remove() - return end - else - self.object:remove() - return end + self.object:remove() + return end end