From 7061fd63d5832e082261e70e33ca332a4634c964 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 7 Jul 2017 14:40:38 +0200 Subject: [PATCH] Fix crash when sheep replaces grass --- mods/ENTITIES/mobs_mc/sheep.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/ENTITIES/mobs_mc/sheep.lua b/mods/ENTITIES/mobs_mc/sheep.lua index 8fa76b76..3f33b25c 100644 --- a/mods/ENTITIES/mobs_mc/sheep.lua +++ b/mods/ENTITIES/mobs_mc/sheep.lua @@ -86,6 +86,9 @@ mobs:register_mob("mobs_mc:sheep", { -- Properly regrow wool after eating grass on_replace = function(self, pos, oldnode, newnode) self.gotten = false + if not self.color or not colors[self.color] then + self.color = "unicolor_white" + end self.drops = { {name = mobs_mc.items.mutton_raw, chance = 1,