From 1351906574f50bf3578c5f7e9eb5d7a55d5d0b13 Mon Sep 17 00:00:00 2001 From: upsilon Date: Tue, 17 Jan 2017 19:22:49 +0100 Subject: [PATCH] Remove arrow object if it cannot be throw --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 0bc490f..8b00cd2 100644 --- a/init.lua +++ b/init.lua @@ -22,6 +22,7 @@ local function shoot_arrow(itemstack, player) if luaentity.on_throw then if luaentity.on_throw(pos, player, ((player:get_wield_index()+1) % inventory:get_size("main")) + 1, luaentity.data, luaentity) == false then + obj:remove() return false end end