1
0
mirror of https://codeberg.org/tenplus1/mobs_animal.git synced 2024-12-22 17:00:26 +01:00

fix 5.0x nil error when feeding sheep/cow

This commit is contained in:
TenPlus1 2018-12-16 20:27:41 +00:00
parent 0703b8b4f2
commit 631cddc727
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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