mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 20:03:45 +01:00
Make villagers homeless when bed is gone on return
This commit is contained in:
parent
8d0afede37
commit
12a943e222
@ -946,6 +946,10 @@ local function go_home(entity)
|
||||
if vector.distance(b,s) < 10 then
|
||||
entity.state = "stand"
|
||||
set_velocity(entity,0)
|
||||
local n=minetest.get_node(b)
|
||||
if n and n.name ~= "mcl_beds:bed_red_bottom" then
|
||||
entity.bed=nil --bed is gone, make villager homeless
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user