Fix crash when sheep replaces grass

This commit is contained in:
Wuzzy 2017-07-07 14:40:38 +02:00
parent 4000af14fa
commit 7061fd63d5

View File

@ -86,6 +86,9 @@ mobs:register_mob("mobs_mc:sheep", {
-- Properly regrow wool after eating grass -- Properly regrow wool after eating grass
on_replace = function(self, pos, oldnode, newnode) on_replace = function(self, pos, oldnode, newnode)
self.gotten = false self.gotten = false
if not self.color or not colors[self.color] then
self.color = "unicolor_white"
end
self.drops = { self.drops = {
{name = mobs_mc.items.mutton_raw, {name = mobs_mc.items.mutton_raw,
chance = 1, chance = 1,