diff --git a/mods/ENTITIES/mobs_mc/iron_golem.lua b/mods/ENTITIES/mobs_mc/iron_golem.lua index 2d081e4fe..b79971b9b 100644 --- a/mods/ENTITIES/mobs_mc/iron_golem.lua +++ b/mods/ENTITIES/mobs_mc/iron_golem.lua @@ -4,6 +4,7 @@ --License for code WTFPL and otherwise stated in readmes local S = minetest.get_translator("mobs_mc") +local allow_nav_hacks = minetest.settings:get_bool("mcl_mob_allow_nav_hacks ",false) --################### --################### IRON GOLEM @@ -93,7 +94,7 @@ mcl_mobs.register_mob("mobs_mc:iron_golem", { self.home_timer = 0 if self._home and self.state ~= "attack" then local dist = vector.distance(self._home,self.object:get_pos()) - if dist >= tele_dist then + if allow_nav_hacks and dist >= tele_dist then self.object:set_pos(self._home) self.state = "stand" self.order = "follow" diff --git a/settingtypes.txt b/settingtypes.txt index 82086de14..0b466f76f 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -207,6 +207,10 @@ mcl_mobs_overworld_threshold (Artificial light threshold to stop monster spawns mcl_mobs_overworld_sky_threshold (Skylight threshold to stop monster spawns in the Overworld) int 7 0 14 mcl_mobs_overworld_passive_threshold (Combined light threshold to stop animal and npc spawns in the Overworld) int 7 0 14 +# Enable workarounds for faulty mob navigation. +# Hack 1: teleport golems home if they are very far from home +mcl_mob_allow_nav_hacks (Mob navigation hacks) bool false + [Audio] # Enable flame sound. flame_sound (Flame sound) bool true