From 3fe8d2d3c59ca6c173817a9d2d6b48e3549acd57 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Thu, 22 Apr 2021 20:30:50 -0400 Subject: [PATCH] Add file death_logic.lua --- mods/ENTITIES/mcl_mobs/api/api.lua | 1 + mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua | 4 +++- mods/ENTITIES/mcl_mobs/api/mob_functions/death_logic.lua | 0 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 mods/ENTITIES/mcl_mobs/api/mob_functions/death_logic.lua diff --git a/mods/ENTITIES/mcl_mobs/api/api.lua b/mods/ENTITIES/mcl_mobs/api/api.lua index facec57d3..3e13dc852 100644 --- a/mods/ENTITIES/mcl_mobs/api/api.lua +++ b/mods/ENTITIES/mcl_mobs/api/api.lua @@ -159,6 +159,7 @@ dofile(api_path .. "movement.lua") dofile(api_path .. "set_up.lua") dofile(api_path .. "attack_type_instructions.lua") dofile(api_path .. "sound_handling.lua") +dofile(api_path .. "death_logic.lua") mobs.spawning_mobs = {} diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua index cf19f3ab3..313f3f3f9 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua @@ -611,7 +611,7 @@ mobs.mob_step = function(self, dtime) end if self.health <= 0 then - print("I'm DEAD :(") + return end @@ -668,6 +668,8 @@ mobs.mob_step = function(self, dtime) if self.pause_timer < 0 then self.pause_timer = 0 end + + return -- don't allow collision detection --do normal ai else --jump only (like slimes) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/death_logic.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/death_logic.lua new file mode 100644 index 000000000..e69de29bb