mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-28 05:03:03 +00:00
Fix sheep losing color after re-activation
This commit is contained in:
parent
c5668b3f25
commit
fb26d6d274
1 changed files with 7 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue