Add a setting to enable mod nav hacks
This commit is contained in:
parent
06f9486e4d
commit
89c97690c8
@ -4,6 +4,7 @@
|
|||||||
--License for code WTFPL and otherwise stated in readmes
|
--License for code WTFPL and otherwise stated in readmes
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_mc")
|
local S = minetest.get_translator("mobs_mc")
|
||||||
|
local allow_nav_hacks = minetest.settings:get_bool("mcl_mob_allow_nav_hacks ",false)
|
||||||
|
|
||||||
--###################
|
--###################
|
||||||
--################### IRON GOLEM
|
--################### IRON GOLEM
|
||||||
@ -93,7 +94,7 @@ mcl_mobs.register_mob("mobs_mc:iron_golem", {
|
|||||||
self.home_timer = 0
|
self.home_timer = 0
|
||||||
if self._home and self.state ~= "attack" then
|
if self._home and self.state ~= "attack" then
|
||||||
local dist = vector.distance(self._home,self.object:get_pos())
|
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.object:set_pos(self._home)
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
self.order = "follow"
|
self.order = "follow"
|
||||||
|
@ -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_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
|
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]
|
[Audio]
|
||||||
# Enable flame sound.
|
# Enable flame sound.
|
||||||
flame_sound (Flame sound) bool true
|
flame_sound (Flame sound) bool true
|
||||||
|
Loading…
Reference in New Issue
Block a user