From 3649e5f6f50c917e3c29bbd0b95327e3667ae1ef Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Sat, 24 Apr 2021 00:17:09 -0400 Subject: [PATCH] Make horse breedable --- mods/ENTITIES/mobs_mc/horse.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mobs_mc/horse.lua b/mods/ENTITIES/mobs_mc/horse.lua index 404efc2921..d35e5bc9d4 100644 --- a/mods/ENTITIES/mobs_mc/horse.lua +++ b/mods/ENTITIES/mobs_mc/horse.lua @@ -117,7 +117,7 @@ local horse = { fly = false, walk_chance = 60, view_range = 16, - follow = mobs_mc.follow.horse, + follow = "mcl_farming:wheat_item", passive = true, hp_min = 15, hp_max = 30, @@ -217,6 +217,22 @@ local horse = { local iname = item:get_name() local heal = 0 + --sneak click to breed the horse/feed it + if self.owner and self.owner == clicker:get_player_name() and clicker:get_player_control().sneak then + --attempt to enter breed state + if mobs.enter_breed_state(self,clicker) then + return + end + + --make baby grow faster + if self.baby then + mobs.make_baby_grow_faster(self,clicker) + return + end + + return + end + -- Taming self.temper = self.temper or (math.random(1,100))