From 5533ec7bac45c9f2a8276b8ab439c0c09501e738 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 9 Feb 2023 19:27:06 -0500 Subject: [PATCH] fix mobs losing their textures. --- mods/ENTITIES/mcl_mobs/api.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index cad3578ea..120537d57 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -135,8 +135,9 @@ function mob_class:mob_activate(staticdata, def, dtime) end end - if not self.base_texture then - + -- Added from PR comments + --if not self.base_texture then + if not self.base_texture or (def.textures and table.indexof(def.textures, self.base_texture) == -1) then -- compatiblity with old simple mobs textures if type(def.textures[1]) == "string" then def.textures = {def.textures} @@ -151,6 +152,7 @@ function mob_class:mob_activate(staticdata, def, dtime) self.base_colbox = self.collisionbox self.base_selbox = self.selectionbox end + -- End Added PR Comment Code. if not self.base_selbox then self.base_selbox = self.selectionbox or self.base_colbox