From 6f6dac02e85a5923eb7edd78aa9a038c3d05b3f7 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 16 Oct 2022 11:37:38 +0200 Subject: [PATCH] don't damage falling mobs landing on air or ignore --- mods/ENTITIES/mcl_mobs/api.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index ebbfa1c4b..c4ef046ea 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -3278,11 +3278,10 @@ local falling = function(self, pos) -- fall damage onto solid ground if self.fall_damage == 1 and self.object:get_velocity().y == 0 then - + local n = node_ok(vector.offset(pos,0,-1,0)).name local d = (self.old_y or 0) - self.object:get_pos().y - if d > 5 then - + if d > 5 and n ~= "air" and n ~= "ignore" then local add = minetest.get_item_group(self.standing_on, "fall_damage_add_percent") local damage = d - 5 if add ~= 0 then