Check 3 nodes above for enderman spawn

This commit is contained in:
cora 2022-07-21 03:07:03 +02:00
parent 2ba1a40820
commit acbf043df0

View file

@ -257,6 +257,9 @@ mcl_mobs:register_mob("mobs_mc:enderman", {
}, },
animation = select_enderman_animation("normal"), animation = select_enderman_animation("normal"),
_taken_node = "", _taken_node = "",
can_spawn = function(pos)
return #minetest.find_nodes_in_area(vector.offset(pos,0,1,0),vector.offset(pos,0,3,0),{"air"}) > 2
end,
do_custom = function(self, dtime) do_custom = function(self, dtime)
-- PARTICLE BEHAVIOUR HERE. -- PARTICLE BEHAVIOUR HERE.
local enderpos = self.object:get_pos() local enderpos = self.object:get_pos()