Prevent possible/rare crash
This commit is contained in:
parent
1daf5ee7a9
commit
a94f80647f
@ -182,7 +182,7 @@ local def = {
|
||||
if self.mode == "eat" and self.eat_node then
|
||||
self.regrow_wool = true
|
||||
end
|
||||
if self.last_mode == "eat" and self.modetimer == 0 and self.regrow_wool then
|
||||
if self.last_mode == "eat" and (self.modetimer and self.modetimer == 0) and self.regrow_wool then
|
||||
self.has_wool = true
|
||||
self.regrow_wool = nil
|
||||
self.object:set_properties({textures = {"creatures_sheep.png^creatures_sheep_white.png"}})
|
||||
|
Loading…
x
Reference in New Issue
Block a user