From 5d5babdb20afce8d67a0a713a01b56c8da9933c8 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Tue, 1 Nov 2022 01:02:22 +0000 Subject: [PATCH] Tweak distance to current_target check --- mods/ENTITIES/mcl_mobs/api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 2b02aac954..8fdc459d3d 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -2637,7 +2637,7 @@ local function check_gowp(self,dtime) -- 0.6 is working but too sensitive. sends villager back too frequently. 0.7 is quite good, but not with heights -- 0.8 is optimal for 0.025 frequency checks and also 1... Actually. 0.8 is winning -- 0.9 and 1.0 is also good. Stick with unless door open or closing issues - if self.waypoints and #self.waypoints > 0 and ( not self.current_target or not self.current_target["pos"] or distance_to_current_target < 1 ) then + if self.waypoints and #self.waypoints > 0 and ( not self.current_target or not self.current_target["pos"] or distance_to_current_target < 0.9 ) then -- We have waypoints, and no current target, or we're at it. We need a new current_target. do_pathfind_action (self, self.current_target["action"])