1
0
Fork 0

Fix axolotl breeding

This commit is contained in:
parent 4cc0a5b0f1
commit 88897566d9
1 changed files with 6 additions and 9 deletions

View File

@ -83,9 +83,13 @@ local axolotl = {
fear_height = 4, fear_height = 4,
on_rightclick = function(self, clicker) on_rightclick = function(self, clicker)
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
self.object:remove()
clicker:set_wielded_item("mcl_buckets:bucket_axolotl")
awards.unlock(clicker:get_player_name(), "mcl:cutestPredator")
return
end
if mcl_mobs:feed_tame(self, clicker, 1, true, false) then return end if mcl_mobs:feed_tame(self, clicker, 1, true, false) then return end
if mcl_mobs:protect(self, clicker) then return end
if mcl_mobs:capture_mob(self, clicker, 0, 60, 5, false, nil) then return end
end, end,
makes_footstep_sound = false, makes_footstep_sound = false,
@ -128,13 +132,6 @@ local axolotl = {
self.object:set_rotation({x=0,y=(atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate,z=0}) self.object:set_rotation({x=0,y=(atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate,z=0})
end end
end end
end,
on_rightclick = function(self, clicker)
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
self.object:remove()
clicker:set_wielded_item("mcl_buckets:bucket_axolotl")
awards.unlock(clicker:get_player_name(), "mcl:cutestPredator")
end
end end
} }