Lingering potions should not collide with liquids, change behaviors assersion loop to catch nil members

This commit is contained in:
teknomunk 2024-09-06 17:59:07 -05:00
parent 01b543bbd4
commit e0ce96f802
2 changed files with 3 additions and 3 deletions

View File

@ -211,7 +211,6 @@ function mcl_potions.register_lingering(name, descr, color, def)
vl_projectile.collides_with_entities, vl_projectile.collides_with_entities,
vl_projectile.collides_with_solids, vl_projectile.collides_with_solids,
}, },
collides_with = {"group:liquid"},
on_collide_with_entity = on_collide, on_collide_with_entity = on_collide,
on_collide_with_solid = function(self, pos, node) on_collide_with_solid = function(self, pos, node)
if mod_target and n == "mcl_target:target_off" then if mod_target and n == "mcl_target:target_off" then

View File

@ -379,8 +379,9 @@ end
function mod.register(name, def) function mod.register(name, def)
assert(def._vl_projectile) assert(def._vl_projectile)
for _,behavior in pairs(def._vl_projectile.behaviors) do local behaviors = def._vl_projectile.behaviors
assert(behavior) for i = 1,#behaviors do
assert(behaviors[i])
end end
if not def.on_step then if not def.on_step then