forked from MineClone5/MineClone5
Make pigs shift click breedable
This commit is contained in:
parent
dbe712bc17
commit
53c96cae2d
|
@ -24,6 +24,9 @@ mobs:register_mob("mobs_mc:pig", {
|
||||||
walk_velocity = 1,
|
walk_velocity = 1,
|
||||||
run_velocity = 3,
|
run_velocity = 3,
|
||||||
follow_velocity = 3.4,
|
follow_velocity = 3.4,
|
||||||
|
breed_distance = 1.5,
|
||||||
|
baby_size = 0.5,
|
||||||
|
follow_distance = 2,
|
||||||
drops = {
|
drops = {
|
||||||
{name = mobs_mc.items.porkchop_raw,
|
{name = mobs_mc.items.porkchop_raw,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
|
@ -50,7 +53,7 @@ mobs:register_mob("mobs_mc:pig", {
|
||||||
run_start = 0,
|
run_start = 0,
|
||||||
run_end = 40,
|
run_end = 40,
|
||||||
},
|
},
|
||||||
follow = mobs_mc.follow.pig,
|
follow = "mcl_farming:carrot_item",
|
||||||
view_range = 8,
|
view_range = 8,
|
||||||
do_custom = function(self, dtime)
|
do_custom = function(self, dtime)
|
||||||
|
|
||||||
|
@ -91,10 +94,17 @@ mobs:register_mob("mobs_mc:pig", {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local wielditem = clicker:get_wielded_item()
|
if clicker:get_player_control().sneak then
|
||||||
-- Feed pig
|
--attempt to enter breed state
|
||||||
if wielditem:get_name() ~= mobs_mc.items.carrot_on_a_stick then
|
if mobs.enter_breed_state(self,clicker) then
|
||||||
if mobs:feed_tame(self, clicker, 1, true, true) then return end
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
--make baby grow faster
|
||||||
|
if self.baby then
|
||||||
|
mobs.make_baby_grow_faster(self,clicker)
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.child then
|
if self.child then
|
||||||
|
|
Loading…
Reference in New Issue