forked from mtcontrib/mobs_animal
		
	fix 5.0x nil error when feeding sheep/cow
This commit is contained in:
		
							
								
								
									
										2
									
								
								cow.lua
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								cow.lua
									
									
									
									
									
								
							@@ -63,7 +63,7 @@ mobs:register_mob("mobs_animal:cow", {
 | 
				
			|||||||
		if mobs:feed_tame(self, clicker, 8, true, true) then
 | 
							if mobs:feed_tame(self, clicker, 8, true, true) then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			-- if fed 7x wheat or grass then cow can be milked again
 | 
								-- 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
 | 
									self.gotten = false
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -95,7 +95,7 @@ stepheight = 0.6,
 | 
				
			|||||||
			if mobs:feed_tame(self, clicker, 8, true, true) then
 | 
								if mobs:feed_tame(self, clicker, 8, true, true) then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				--if fed 7x grass or wheat then sheep regrows wool
 | 
									--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
 | 
										self.gotten = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user