From 58d9fb874d96c1d0be599cf27f61324634189dc2 Mon Sep 17 00:00:00 2001 From: Rootyjr <41842051+Rootyjr@users.noreply.github.com> Date: Thu, 1 Aug 2019 01:18:53 -0500 Subject: [PATCH] Mobs now flash red when hurt. --- mods/ENTITIES/mcl_mobs/api.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index b7a8e22f39..fc12888593 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -453,8 +453,14 @@ local check_for_death = function(self, cause, cmi_cause) self.health = self.hp_max end - -- play damage sound if health was reduced + -- play damage sound if health was reduced and make mob flash red. if damaged then + self.object:set_texture_mod("^[colorize:#FF000040") + minetest.after(.2, function() + if self then + self.object:set_texture_mod("") + end + end) mob_sound(self, self.sounds.damage) end