forked from MineClone5/MineClone5
Make llama breedable
This commit is contained in:
parent
0d4d85bac6
commit
dbe712bc17
|
@ -58,6 +58,9 @@ mobs:register_mob("mobs_mc:llama", {
|
||||||
walk_velocity = 1,
|
walk_velocity = 1,
|
||||||
run_velocity = 4.4,
|
run_velocity = 4.4,
|
||||||
follow_velocity = 4.4,
|
follow_velocity = 4.4,
|
||||||
|
breed_distance = 1.5,
|
||||||
|
baby_size = 0.5,
|
||||||
|
follow_distance = 2,
|
||||||
floats = 1,
|
floats = 1,
|
||||||
reach = 6,
|
reach = 6,
|
||||||
drops = {
|
drops = {
|
||||||
|
@ -92,7 +95,7 @@ mobs:register_mob("mobs_mc:llama", {
|
||||||
look_start = 78,
|
look_start = 78,
|
||||||
look_end = 108,
|
look_end = 108,
|
||||||
},
|
},
|
||||||
follow = mobs_mc.follow.llama,
|
follow = mobs_mc.items.hay_bale,
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
do_custom = function(self, dtime)
|
do_custom = function(self, dtime)
|
||||||
|
|
||||||
|
@ -135,15 +138,18 @@ mobs:register_mob("mobs_mc:llama", {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local item = clicker:get_wielded_item()
|
--attempt to enter breed state
|
||||||
if item:get_name() == mobs_mc.items.hay_bale then
|
if mobs.enter_breed_state(self,clicker) then
|
||||||
-- Breed with hay bale
|
return
|
||||||
if mobs:feed_tame(self, clicker, 1, true, false) then return end
|
|
||||||
else
|
|
||||||
-- Feed with anything else
|
|
||||||
if mobs:feed_tame(self, clicker, 1, false, true) then return end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--make baby grow faster
|
||||||
|
if self.baby then
|
||||||
|
mobs.make_baby_grow_faster(self,clicker)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Make sure tamed llama is mature and being clicked by owner only
|
-- Make sure tamed llama is mature and being clicked by owner only
|
||||||
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
|
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue