mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 20:41:11 +01:00
Enderman will take nodes only below air
This commit is contained in:
parent
42155c6bdc
commit
9b9ee66b00
1 changed files with 1 additions and 1 deletions
|
@ -364,7 +364,7 @@ mobs:register_mob("mobs_mc:enderman", {
|
|||
self._take_place_timer = 0
|
||||
self._next_take_place_time = math.random(place_frequency_min, place_frequency_max)
|
||||
local pos = self.object:get_pos()
|
||||
local takable_nodes = minetest.find_nodes_in_area({x=pos.x-2, y=pos.y-1, z=pos.z-2}, {x=pos.x+2, y=pos.y+1, z=pos.z+2}, mobs_mc.enderman_takable)
|
||||
local takable_nodes = minetest.find_nodes_in_area_under_air({x=pos.x-2, y=pos.y-1, z=pos.z-2}, {x=pos.x+2, y=pos.y+1, z=pos.z+2}, mobs_mc.enderman_takable)
|
||||
if #takable_nodes >= 1 then
|
||||
local r = pr:next(1, #takable_nodes)
|
||||
local take_pos = takable_nodes[r]
|
||||
|
|
Loading…
Reference in a new issue