forked from mtcontrib/mobs_animal
		
	fix nametag bug when colouring sheep
This commit is contained in:
		@@ -339,9 +339,11 @@ for _, col in ipairs(all_colours) do
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
							if ent then
 | 
												if ent then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
													local prop = self.object:get_properties()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
								-- add old sheep attributes
 | 
													-- add old sheep attributes
 | 
				
			||||||
								ent.attribute_horns = self.attribute_horns
 | 
													ent.attribute_horns = self.attribute_horns
 | 
				
			||||||
								ent.nametag = self.nametag
 | 
													ent._nametag = prop.nametag
 | 
				
			||||||
								ent.owner = name
 | 
													ent.owner = name
 | 
				
			||||||
								ent.tamed = true
 | 
													ent.tamed = true
 | 
				
			||||||
								ent.protected = self.protected
 | 
													ent.protected = self.protected
 | 
				
			||||||
@@ -354,8 +356,7 @@ for _, col in ipairs(all_colours) do
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
								ent.base_texture = {textures}
 | 
													ent.base_texture = {textures}
 | 
				
			||||||
								ent.object:set_properties({
 | 
													ent.object:set_properties({
 | 
				
			||||||
									textures = {textures},
 | 
														textures = {textures}
 | 
				
			||||||
									nametag = self.nametag
 | 
					 | 
				
			||||||
								})
 | 
													})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
								-- remove old sheep
 | 
													-- remove old sheep
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user