From fb26d6d274e17af7129ba2af4d77906b0a319b0a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 30 May 2017 18:06:21 +0200 Subject: [PATCH] Fix sheep losing color after re-activation --- mods/ENTITIES/mobs_mc/sheep.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mods/ENTITIES/mobs_mc/sheep.lua b/mods/ENTITIES/mobs_mc/sheep.lua index e9e5643572..e02736fffd 100644 --- a/mods/ENTITIES/mobs_mc/sheep.lua +++ b/mods/ENTITIES/mobs_mc/sheep.lua @@ -87,26 +87,32 @@ mobs:register_mob("mobs_mc:sheep", { -- 81.836% self.color = colors["white"][1] textures = colors["white"][2] + self.base_texture = colors["white"][2] elseif r <= 81836 + 5000 then -- 5% self.color = colors["grey"][1] textures = colors["grey"][2] + self.base_texture = colors["grey"][2] elseif r <= 81836 + 5000 + 5000 then -- 5% self.color = colors["dark_grey"][1] textures = colors["dark_grey"][2] + self.base_texture = colors["dark_grey"][2] elseif r <= 81836 + 5000 + 5000 + 5000 then -- 5% self.color = colors["black"][1] textures = colors["black"][2] + self.base_texture = colors["black"][2] elseif r <= 81836 + 5000 + 5000 + 5000 + 3000 then -- 3% self.color = colors["brown"][1] textures = colors["brown"][2] + self.base_texture = colors["brown"][2] else -- 0.164% self.color = colors["pink"][1] textures = colors["pink"][2] + self.base_texture = colors["pink"][2] end self.textures = { textures }, self.object:set_properties({ textures = textures }) @@ -156,6 +162,7 @@ print(item:get_name(), minetest.get_item_group(item:get_name(), "dye")) self.object:set_properties({ textures = colors[pname][2], }) + self.base_texture = colors[pname][2] self.color = colors[pname][1] self.drops = { {name = "mcl_mobitems:mutton",