1
0
Fork 0

villagers go to the bell if it's rung(for now)

this will help with further testing pathfinding until villagers
get a proper schedule and do more things
mobs_head_rotation
cora 2022-05-22 01:53:10 +02:00
parent ec73afd21a
commit d34191f00c
1 changed files with 7 additions and 1 deletions

View File

@ -5,7 +5,13 @@ mcl_bells = {}
local has_mcl_wip = minetest.get_modpath("mcl_wip") local has_mcl_wip = minetest.get_modpath("mcl_wip")
function mcl_bells.ring_once(pos) function mcl_bells.ring_once(pos)
minetest.sound_play( "mcl_bells_bell_stroke", { pos = pos, gain = 1.5, max_hear_distance = 300,}); minetest.sound_play( "mcl_bells_bell_stroke", { pos = pos, gain = 1.5, max_hear_distance = 150,})
local vv=minetest.get_objects_inside_radius(pos,150)
for _,o in pairs(vv) do
if o.type == "npc" then
mobs:gopath(o:get_luaentity(),pos,function() end)
end
end
end end
minetest.register_node("mcl_bells:bell", { minetest.register_node("mcl_bells:bell", {