Update Fork #1

Merged
chmodsayshello merged 696 commits from MineClone5/MineClone5:master into master 2022-03-23 14:40:26 +01:00
3 changed files with 32 additions and 3 deletions
Showing only changes of commit 49f84f194a - Show all commits

View File

@ -893,6 +893,17 @@ function mobs.mob_step(self, dtime)
end
end
--water damage
if self.water_damage and self.water_damage ~= 0 then
local pos = self.object:get_pos()
local node = minetest_get_node(pos).name
if minetest_get_item_group(node, "water") ~= 0 then
mobs.smoke_effect(self)
self.health = self.health - self.water_damage
self:teleport()
end
end
--set mobs on fire when burned by sunlight
if self.ignited_by_sunlight then
local pos = self.object:get_pos()

View File

@ -147,4 +147,24 @@ mobs.breeding_effect = function(self)
vertical = false,
texture = "heart.png",
})
end
end
mobs.smoke_effect = function(self)
local pos = self.object:get_pos()
minetest.add_particlespawner({
amount = 5,
time = 0.25,
minpos = pos,
maxpos = pos,
minvel = {x = -1, y = -1, z = -1},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = 0, y = 10, z = 0},
maxacc = {x = 0, y = 10, z = 0},
minexptime = 0.1,
maxexptime = 1,
minsize = 0.5,
maxsize = 1,
collisiondetection = false,
texture = "mcl_particles_smoke.png",
})
end

View File

@ -1,2 +0,0 @@
mcl_mobs
mcl_potions