1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-09-30 00:10:33 +02:00

Added check for lavaslime to not destroy actual nodes with fire

- Lavaslimes now check if the node there are trying to place fire instead of
  is air. If it is not, they do not put fire (to avoid detroying nodes)
This commit is contained in:
LeMagnesium 2015-04-17 22:41:04 +02:00
parent 45f0af6215
commit db8cc41fd7

View File

@ -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