diff --git a/mods/ENTITIES/mobs_mc/ocelot.lua b/mods/ENTITIES/mobs_mc/ocelot.lua index 8a7ea7545..f45a78406 100644 --- a/mods/ENTITIES/mobs_mc/ocelot.lua +++ b/mods/ENTITIES/mobs_mc/ocelot.lua @@ -162,7 +162,8 @@ cat.on_spawn = function(self) self._texture = {"mobs_mc_cat_black.png"} end if not self._texture then - self._texture = cat.textures[math.random(#cat.textures)] + local max_tex = table.maxn (cat.textures) + self._texture = cat.textures[pr.next(1,max_tex)] -- pick a random texture. end self.object:set_properties({textures = {self._texture}}) end