forked from mtcontrib/mobs_animal
		
	have chance of chicken dropping a feather
This commit is contained in:
		@@ -89,13 +89,14 @@ mobs:register_mob("mobs_animal:chicken", {
 | 
			
		||||
		end
 | 
			
		||||
		self.egg_timer = 0
 | 
			
		||||
 | 
			
		||||
		if self.child
 | 
			
		||||
		or math.random(100) > 1 then
 | 
			
		||||
		if self.child then
 | 
			
		||||
			return
 | 
			
		||||
		end
 | 
			
		||||
 | 
			
		||||
		local pos = self.object:get_pos() ; if not pos then return end
 | 
			
		||||
 | 
			
		||||
		if math.random(100) == 1 then
 | 
			
		||||
 | 
			
		||||
			minetest.add_item(pos, "mobs:egg")
 | 
			
		||||
 | 
			
		||||
			minetest.sound_play("default_place_node_hard", {
 | 
			
		||||
@@ -103,6 +104,10 @@ mobs:register_mob("mobs_animal:chicken", {
 | 
			
		||||
				gain = 1.0,
 | 
			
		||||
				max_hear_distance = 5
 | 
			
		||||
			}, true)
 | 
			
		||||
 | 
			
		||||
		elseif math.random(100) < 3 then
 | 
			
		||||
			minetest.add_item(pos, "mobs:chicken_feather")
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user