From 13c321e8f2c8cb43460093852d44ddae7edec0c1 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Fri, 23 Apr 2021 18:03:01 -0400 Subject: [PATCH 1/2] Re-enable mob spawning --- mods/ENTITIES/mcl_mobs/api/spawning.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api/spawning.lua b/mods/ENTITIES/mcl_mobs/api/spawning.lua index 100fc84b6..f885d55c7 100644 --- a/mods/ENTITIES/mcl_mobs/api/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/api/spawning.lua @@ -165,8 +165,6 @@ Overworld regular: local mobs_spawn = minetest.settings:get_bool("mobs_spawn", true) ~= false -mobs_spawn = false - -- count how many mobs are in an area local count_mobs = function(pos) local num = 0 From 31ded5e40fc97a7afd252fd74154183afaf1f568 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Fri, 23 Apr 2021 18:34:20 -0400 Subject: [PATCH 2/2] Re-implement neutral mob switch --- .../mcl_mobs/api/mob_functions/interaction.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/interaction.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/interaction.lua index b564aaf48..b2f811752 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/interaction.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/interaction.lua @@ -64,6 +64,21 @@ mobs.mob_punch = function(self, hitter, tflp, tool_capabilities, dir) return end + --neutral passive mobs switch to neutral hostile + if self.neutral then + --drop in variables for attacking (stops crash) + self.attacking = hitter + self.punch_timer = 0 + self.hostile = true + --hostile_cooldown timer is initialized here + self.hostile_cooldown_timer = self.hostile_cooldown + + --initialize the group attack (check for other mobs in area, make them neutral hostile) + if self.group_attack then + mobs.group_attack_initialization(self) + end + end + --turn skittish mobs away and RUN if self.skittish then