Fix crash when sheep replaces grass
parent
4000af14fa
commit
7061fd63d5
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue