From acbf043df04993f1fd21446fbc8f08b2a2ad388b Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 21 Jul 2022 03:07:03 +0200 Subject: [PATCH] Check 3 nodes above for enderman spawn --- mods/ENTITIES/mobs_mc/enderman.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index 8472f76e07..a57a82931f 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -257,6 +257,9 @@ mcl_mobs:register_mob("mobs_mc:enderman", { }, animation = select_enderman_animation("normal"), _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) -- PARTICLE BEHAVIOUR HERE. local enderpos = self.object:get_pos()