From bc7b1e7751fd433b6952179bed43aaa693730fe3 Mon Sep 17 00:00:00 2001 From: Blue Blancmange <> Date: Wed, 29 Mar 2023 18:40:08 +0100 Subject: [PATCH] touching flaming mobs no longer set you on fire - instead 50% chance when flaming mob hits you --- mods/ENTITIES/mcl_mobs/combat.lua | 3 +++ mods/ENTITIES/mcl_mobs/physics.lua | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/combat.lua b/mods/ENTITIES/mcl_mobs/combat.lua index 6686de027..5e6a90510 100644 --- a/mods/ENTITIES/mcl_mobs/combat.lua +++ b/mods/ENTITIES/mcl_mobs/combat.lua @@ -1086,6 +1086,9 @@ function mob_class:do_states_attack (dtime) if attached then self.attack = attached end + if self.attack:is_player() and mcl_burning.is_burning(self.object) and math.random(2) == 1 then + mcl_burning.set_on_fire(self.attack, 2) + end self.attack:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = self.damage} diff --git a/mods/ENTITIES/mcl_mobs/physics.lua b/mods/ENTITIES/mcl_mobs/physics.lua index 0617fd1e8..6094e1821 100644 --- a/mods/ENTITIES/mcl_mobs/physics.lua +++ b/mods/ENTITIES/mcl_mobs/physics.lua @@ -163,10 +163,10 @@ function mob_class:collision() local ent = object:get_luaentity() if object:is_player() or (ent and ent.is_mob and object ~= self.object) then - - if object:is_player() and mcl_burning.is_burning(self.object) then - mcl_burning.set_on_fire(object, 4) - end + -- no + --if object:is_player() and mcl_burning.is_burning(self.object) then + -- mcl_burning.set_on_fire(object, 4) + --end local pos2 = object:get_pos() local vec = {x = pos.x - pos2.x, z = pos.z - pos2.z}