diff --git a/cow.lua b/cow.lua index ec44b90..0728e38 100644 --- a/cow.lua +++ b/cow.lua @@ -63,7 +63,7 @@ mobs:register_mob("mobs_animal:cow", { if mobs:feed_tame(self, clicker, 8, true, true) then -- if fed 7x wheat or grass then cow can be milked again - if self.food > 6 then + if self.food and self.food > 6 then self.gotten = false end diff --git a/sheep.lua b/sheep.lua index d15d68f..38efac0 100644 --- a/sheep.lua +++ b/sheep.lua @@ -95,7 +95,7 @@ stepheight = 0.6, if mobs:feed_tame(self, clicker, 8, true, true) then --if fed 7x grass or wheat then sheep regrows wool - if self.food > 6 then + if self.food and self.food > 6 then self.gotten = false