allow mobs to walk on stone

This commit is contained in:
Luke aka SwissalpS 2022-01-15 23:50:45 +01:00
parent fc6a6f4ddd
commit ad059183b8
2 changed files with 14 additions and 0 deletions

View File

@ -189,6 +189,10 @@ if minetest.get_modpath("bonemeal") then
dofile(MP.."/bonemeal.lua")
end
if minetest.get_modpath("mobs") then
dofile(MP .. "/mobs.lua")
end
if minetest.get_modpath("mobs_animal") then
-- additional animals/textures
dofile(MP.."/mobs_animal.lua")
@ -222,3 +226,4 @@ end
if minetest.get_modpath("toolranks") then
dofile(MP.."/toolranks.lua")
end

9
mobs.lua Normal file
View File

@ -0,0 +1,9 @@
-- mobs and beowolf don't play nicely together when stone is made
-- dangerous by beowolf, we counteract that here to make mobs not fear
-- stone and become more challenging again
local is_node_dangerous = mobs.is_node_dangerous
function mobs.is_node_dangerous(mob_obj, nodename)
if 'default:stone' == nodename then return false end
return is_node_dangerous(mob_obj, nodename)
end