Incorperate sheep eating animation. #3734
parent
46d486c7cb
commit
2e2f56122d
|
@ -480,6 +480,7 @@ end
|
|||
-- find and replace what mob is looking for (grass, wheat etc.)
|
||||
function mob_class:replace_node(pos)
|
||||
|
||||
|
||||
if not self.replace_rate
|
||||
or not self.replace_what
|
||||
or self.child == true
|
||||
|
@ -519,6 +520,8 @@ function mob_class:replace_node(pos)
|
|||
if on_replace_return ~= false then
|
||||
|
||||
if mobs_griefing then
|
||||
self.state = "eat"
|
||||
self:set_animation("eat")
|
||||
minetest.set_node(pos, newnode)
|
||||
end
|
||||
|
||||
|
|
Binary file not shown.
|
@ -101,17 +101,19 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
|
|||
stand_start = 0, stand_end = 0,
|
||||
walk_start = 0, walk_end = 40, walk_speed = 30,
|
||||
run_start = 0, run_end = 40, run_speed = 40,
|
||||
eat_start = 40, eat_end = 80,
|
||||
},
|
||||
child_animations = {
|
||||
stand_start = 81, stand_end = 81,
|
||||
walk_start = 81, walk_end = 121, walk_speed = 45,
|
||||
run_start = 81, run_end = 121, run_speed = 60,
|
||||
eat_start = 121, eat_start = 161,
|
||||
},
|
||||
follow = { "mcl_farming:wheat_item" },
|
||||
view_range = 12,
|
||||
|
||||
-- Eat grass
|
||||
replace_rate = 20,
|
||||
replace_rate = 40,
|
||||
replace_what = {
|
||||
{ "mcl_core:dirt_with_grass", "mcl_core:dirt", -1 },
|
||||
{ "mcl_flowers:tallgrass", "air", 0 },
|
||||
|
|
Loading…
Reference in New Issue