From 408296140a4fe0c785f5fb4760899fdb3851fe00 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Thu, 22 Apr 2021 23:30:32 -0400 Subject: [PATCH] Fix and overhaul wolves --- mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua | 9 ++++++++- mods/ENTITIES/mobs_mc/wolf.lua | 6 ++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua index c6a392e57..fc278ae15 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua @@ -129,7 +129,14 @@ end mobs.group_attack_initialization = function(self) --get basic data - local friends_list = table_copy(self.group_attack) + local friends_list + + if self.group_attack == true then + friends_list = {self.name} + else + friends_list = table_copy(self.group_attack) + end + local objects_in_area = minetest_get_objects_inside_radius(self.object:get_pos(), self.view_range) --get the player's name diff --git a/mods/ENTITIES/mobs_mc/wolf.lua b/mods/ENTITIES/mobs_mc/wolf.lua index 00a41b685..aad4db037 100644 --- a/mods/ENTITIES/mobs_mc/wolf.lua +++ b/mods/ENTITIES/mobs_mc/wolf.lua @@ -22,13 +22,15 @@ local wolf = { type = "animal", spawn_class = "passive", can_despawn = true, + neutral = true, hp_min = 8, hp_max = 8, xp_min = 1, xp_max = 3, + rotate = 270, passive = false, group_attack = true, - collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3}, + collisionbox = {-0.3, -0.00, -0.3, 0.3, 0.85, 0.3}, visual = "mesh", mesh = "mobs_mc_wolf.b3d", textures = { @@ -52,7 +54,7 @@ local wolf = { run_velocity = 3, damage = 4, reach = 2, - attack_type = "dogfight", + attack_type = "punch", fear_height = 4, follow = mobs_mc.follow.wolf, on_rightclick = function(self, clicker)