From 65830b66fa8862eb21d2f13203b374e03aa435bb Mon Sep 17 00:00:00 2001 From: zmv7 <72821250+zmv7@users.noreply.github.com> Date: Tue, 5 Apr 2022 00:57:45 +0500 Subject: [PATCH] Hit only players and mobs --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index a82e2a3..366d9b0 100644 --- a/init.lua +++ b/init.lua @@ -36,7 +36,7 @@ SNOWBALL.on_step = function(self, dtime) if self.timer > 0.2 then local objs = minetest.get_objects_inside_radius({x = pos.x, y = pos.y, z = pos.z}, 1) for k, obj in pairs(objs) do - if obj:get_luaentity() == nil or obj:get_luaentity().name ~= "snowball:ball" then + if obj:get_luaentity() == nil or obj:get_luaentity()._cmi_is_mob then obj:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups= {fleshy = 1},