From 898588539a31e86da080166530e5b9f0cb770db8 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Fri, 27 Sep 2024 20:09:37 -0500 Subject: [PATCH] Fix crash when hit with an arrow that is not piercing --- mods/ITEMS/mcl_bows/arrow.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index 9e7b7b1e2..dbeb227db 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -268,7 +268,7 @@ local arrow_entity = { local hook = item_def and item_def._on_collide_with_entity if hook then hook(self, pos, obj) end - if self._piercing > 0 then + if (self._piercing or 0) > 0 then self._piercing = self._piercing - 1 return end