Don't search for bed when villager already has one

This commit is contained in:
cora 2024-02-14 11:58:32 +01:00 committed by ryvnf
parent 433aa6ff15
commit 6ad209ac7b

View File

@ -117,6 +117,7 @@ end
function mobs_mc.villager_mob:find_closest_bed()
local p = self.object:get_pos()
if self._bed and vector.distance(p, self._bed) < VIL_DIST then return self._bed end
local unclaimed_beds = {}
local nn2 = minetest.find_nodes_in_area(