From 2cf43ffc4e4414ba57217baf48385804fd53e8c4 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 17 May 2025 07:43:26 +0100 Subject: [PATCH] fix fear_height defaults --- api.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api.lua b/api.lua index b05799f..f494a3e 100644 --- a/api.lua +++ b/api.lua @@ -18,7 +18,7 @@ end -- global table mobs = { - mod = "redo", version = "20250516", + mod = "redo", version = "20250517", spawning_mobs = {}, translate = S, node_snow = has(core.registered_aliases["mapgen_snow"]) or has("mcl_core:snow") or has("default:snow") or "air", @@ -162,7 +162,7 @@ mobs.mob_class = { reach = 3, docile_by_day = false, time_of_day = 0.5, - fear_height = 2, +-- fear_height = 0, runaway_timer = 0, immune_to = {}, explosion_timer = 3, @@ -3288,7 +3288,7 @@ function mobs:register_mob(name, def) texture_mods = def.texture_mods or "", child_texture = def.child_texture, docile_by_day = def.docile_by_day, - fear_height = def.fear_height, + fear_height = def.fear_height or def.fly and 0 or 2, runaway = def.runaway, pathfinding = def.pathfinding, immune_to = def.immune_to, @@ -3343,7 +3343,7 @@ function mobs:register_mob(name, def) }, mob_class_meta)) - local self = core.registered_entities[name] + local self = core.registered_entities[name] ; print("--- FH", self.fear_height) mobs.compatibility_check(self) -- older setting check for compatibility end