Cats keep their color

This commit is contained in:
cora 2022-10-10 14:43:08 +02:00
parent 976b1eb153
commit 83f17fd9a7
1 changed files with 10 additions and 0 deletions

View File

@ -157,6 +157,16 @@ cat.on_rightclick = function(self, clicker)
end end
cat.on_spawn = function(self)
if self.owner == "!witch!" then
self._texture = {"mobs_mc_cat_black.png"}
end
if not self._texture then
self._texture = cat.textures[math.random(#cat.textures)]
end
self.object:set_properties({textures = {self._texture}})
end
mcl_mobs:register_mob("mobs_mc:cat", cat) mcl_mobs:register_mob("mobs_mc:cat", cat)
local base_spawn_chance = 5000 local base_spawn_chance = 5000