From f38492bcb031b7fcc2ee8299f66fcd3cd3a68398 Mon Sep 17 00:00:00 2001
From: jordan4ibanez <jordan4ibanez@users.noreply.github.com>
Date: Fri, 16 Apr 2021 11:50:29 -0400
Subject: [PATCH] Re-implement animation check gate for mobs

---
 mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua
index 5750a63b8..2dc0ce34b 100644
--- a/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua
+++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua
@@ -13,8 +13,14 @@ mobs.set_animation = function(self, anim, fixed_frame)
 
 	self.animation.current = self.animation.current or ""
 
-	if (not self.animation[anim .. "_start"] or not self.animation[anim .. "_end"]) then
-		print("largablarga")
+	--animations break if they are constantly set
+	--so we put this return gate to check if it is
+	--already at the animation we are trying to implement
+	if self.animation.current == anim then
+		return
+	end
+
+	if (not self.animation[anim .. "_start"] or not self.animation[anim .. "_end"]) then		
 		return
 	end