1
0
Fork 0

Check 3 nodes above for enderman spawn

wood_api
cora 2022-07-21 03:07:03 +02:00
parent 2ba1a40820
commit acbf043df0
1 changed files with 3 additions and 0 deletions

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()