mirror of
https://codeberg.org/tenplus1/mobs_animal.git
synced 2024-11-12 22:00:19 +01:00
have chance of chicken dropping a feather
This commit is contained in:
parent
7b76829046
commit
bf12043fdc
21
chicken.lua
21
chicken.lua
|
@ -89,20 +89,25 @@ 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
|
||||
|
||||
minetest.add_item(pos, "mobs:egg")
|
||||
if math.random(100) == 1 then
|
||||
|
||||
minetest.sound_play("default_place_node_hard", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5
|
||||
}, true)
|
||||
minetest.add_item(pos, "mobs:egg")
|
||||
|
||||
minetest.sound_play("default_place_node_hard", {
|
||||
pos = pos,
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5
|
||||
}, true)
|
||||
|
||||
elseif math.random(100) < 3 then
|
||||
minetest.add_item(pos, "mobs:chicken_feather")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user