Merge remote-tracking branch 'origin/testing' into compatibility

This commit is contained in:
kay27 2022-02-05 23:05:22 +04:00
commit 4c59094ac5
1 changed files with 6 additions and 3 deletions

View File

@ -89,10 +89,13 @@ mobs:register_mob("mobs_mc:blaze", {
end,
do_custom = function(self)
if self.attacking and self.state == "attack" and vector.distance(self.object:get_pos(), self.attacking:get_pos()) < 1.2 then
mcl_burning.set_on_fire(self.attacking, 5)
end
local pos = self.object:get_pos()
if self.attacking and self.state == "attack" then
local attacking_pos = self.attacking:get_pos()
if attacking_pos and vector.distance(pos, attacking_pos) < 1.2 then
mcl_burning.set_on_fire(self.attacking, 5)
end
end
minetest.add_particle({
pos = {x=pos.x+math.random(-0.7,0.7)*math.random()/2,y=pos.y+math.random(0.7,1.2),z=pos.z+math.random(-0.7,0.7)*math.random()/2},
velocity = {x=0, y=math.random(1,1), z=0},