From 7b47a15e34c08c55639a098e2a349cf82fe6030c Mon Sep 17 00:00:00 2001 From: NO411 Date: Thu, 30 Dec 2021 14:04:53 +0100 Subject: [PATCH] Remove arrow entities when the player leaves to prevent killing on startup --- mods/ITEMS/mcl_bows/arrow.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index 34370761..e8efa666 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -419,6 +419,10 @@ function ARROW_ENTITY.on_step(self, dtime) self.object:set_rotation({ x = 0, y = yaw, z = pitch }) end + if self._in_player and not self.object:get_attach() then + self.object:remove() + end + -- Update internal variable self._lastpos={x=pos.x, y=pos.y, z=pos.z} end