mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Cats keep their color
This commit is contained in:
parent
976b1eb153
commit
83f17fd9a7
1 changed files with 10 additions and 0 deletions
|
@ -157,6 +157,16 @@ cat.on_rightclick = function(self, clicker)
|
|||
|
||||
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)
|
||||
|
||||
local base_spawn_chance = 5000
|
||||
|
|
Loading…
Reference in a new issue