From e0ce96f8027270d1bb43956eb1ce953047b3fceb Mon Sep 17 00:00:00 2001 From: teknomunk Date: Fri, 6 Sep 2024 17:59:07 -0500 Subject: [PATCH] Lingering potions should not collide with liquids, change behaviors assersion loop to catch nil members --- mods/ITEMS/mcl_potions/lingering.lua | 1 - mods/ITEMS/vl_projectile/init.lua | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_potions/lingering.lua b/mods/ITEMS/mcl_potions/lingering.lua index 2a4d7651e..655ff4d39 100644 --- a/mods/ITEMS/mcl_potions/lingering.lua +++ b/mods/ITEMS/mcl_potions/lingering.lua @@ -211,7 +211,6 @@ function mcl_potions.register_lingering(name, descr, color, def) vl_projectile.collides_with_entities, vl_projectile.collides_with_solids, }, - collides_with = {"group:liquid"}, on_collide_with_entity = on_collide, on_collide_with_solid = function(self, pos, node) if mod_target and n == "mcl_target:target_off" then diff --git a/mods/ITEMS/vl_projectile/init.lua b/mods/ITEMS/vl_projectile/init.lua index b28364041..74680e90f 100644 --- a/mods/ITEMS/vl_projectile/init.lua +++ b/mods/ITEMS/vl_projectile/init.lua @@ -379,8 +379,9 @@ end function mod.register(name, def) assert(def._vl_projectile) - for _,behavior in pairs(def._vl_projectile.behaviors) do - assert(behavior) + local behaviors = def._vl_projectile.behaviors + for i = 1,#behaviors do + assert(behaviors[i]) end if not def.on_step then