From 6083c4895deb275a69cd60a5c4840f0cb225173a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 21 May 2017 06:03:58 +0200 Subject: [PATCH] Exhaust player for being hit by mob projectile --- mods/ENTITIES/mobs_mc/blaze.lua | 1 + mods/ENTITIES/mobs_mc/depends.txt | 1 + mods/ENTITIES/mobs_mc/ghast.lua | 1 + 3 files changed, 3 insertions(+) diff --git a/mods/ENTITIES/mobs_mc/blaze.lua b/mods/ENTITIES/mobs_mc/blaze.lua index 5c035f7bef..1f092a7e5e 100644 --- a/mods/ENTITIES/mobs_mc/blaze.lua +++ b/mods/ENTITIES/mobs_mc/blaze.lua @@ -82,6 +82,7 @@ mobs:register_arrow("mobs_mc:blaze_fireball", { full_punch_interval = 1.0, damage_groups = {fleshy = 5}, }, nil) + mcl_hunger.exhaust(player:get_player_name(), mcl_hunger.EXHAUST_DAMAGE) end, hit_mob = function(self, player) diff --git a/mods/ENTITIES/mobs_mc/depends.txt b/mods/ENTITIES/mobs_mc/depends.txt index 5c82200025..831e9085a8 100644 --- a/mods/ENTITIES/mobs_mc/depends.txt +++ b/mods/ENTITIES/mobs_mc/depends.txt @@ -1,5 +1,6 @@ mcl_core mcl_tools +mcl_hunger mcl_fire mobs mcl_tnt diff --git a/mods/ENTITIES/mobs_mc/ghast.lua b/mods/ENTITIES/mobs_mc/ghast.lua index 44b21ee59a..90824c4fcc 100644 --- a/mods/ENTITIES/mobs_mc/ghast.lua +++ b/mods/ENTITIES/mobs_mc/ghast.lua @@ -95,6 +95,7 @@ mobs:register_arrow("mobs_mc:ghast_fireball", { full_punch_interval = 1.0, damage_groups = {fleshy = 6}, }, nil) + mcl_hunger.exhaust(player:get_player_name(), mcl_hunger.EXHAUST_DAMAGE) end, hit_mob = function(self, player)