diff --git a/mods/mobs/api.lua b/mods/mobs/api.lua index b4f214cd..572d2407 100755 --- a/mods/mobs/api.lua +++ b/mods/mobs/api.lua @@ -184,7 +184,7 @@ lifetimer = def.lifetimer or 600, -- check for mob drop/replace (used for chicken egg and sheep eating grass/wheat) if self.replace_rate and math.random(1,self.replace_rate) == 1 and self.child == false then local pos = self.object:getpos() ; pos.y = pos.y + self.replace_offset - if self.footstep and self.object:getvelocity().y == 0 then minetest.set_node(pos, {name = self.footstep}) end + if self.footstep and self.object:getvelocity().y == 0 and minetest.get_node(pos).name == "air" then minetest.set_node(pos, {name = self.footstep}) end if #minetest.find_nodes_in_area(pos,pos,self.replace_what) > 0 and self.object:getvelocity().y == 0 and self.replace_what