From fb2a247d310422cce9bde7f48c7dc53261942d19 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 1 Jul 2024 07:49:03 +0100 Subject: [PATCH] change fall_damage check to use true/false --- api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api.lua b/api.lua index 0df0c74..be793f9 100644 --- a/api.lua +++ b/api.lua @@ -156,7 +156,7 @@ mobs.mob_class = { air_damage = 0, node_damage = true, suffocation = 2, - fall_damage = 1, + fall_damage = true, fall_speed = -10, -- must be lower than -2 (default: -10) drops = {}, armor = 100, @@ -2791,7 +2791,7 @@ function mob_class:falling(pos) else -- fall damage onto solid ground - if self.fall_damage == 1 + if self.fall_damage and self.object:get_velocity().y == 0 then local d = (self.old_y or 0) - self.object:get_pos().y