From 88897566d9a25c4dc0033fad0b3a916c6847858b Mon Sep 17 00:00:00 2001 From: Johannes Fritz Date: Thu, 24 Nov 2022 09:10:17 -0600 Subject: [PATCH] Fix axolotl breeding --- mods/ENTITIES/mobs_mc/axolotl.lua | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/axolotl.lua b/mods/ENTITIES/mobs_mc/axolotl.lua index 51f1ae1525..96cf5e069c 100644 --- a/mods/ENTITIES/mobs_mc/axolotl.lua +++ b/mods/ENTITIES/mobs_mc/axolotl.lua @@ -83,9 +83,13 @@ local axolotl = { fear_height = 4, 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:protect(self, clicker) then return end - if mcl_mobs:capture_mob(self, clicker, 0, 60, 5, false, nil) then return end end, 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}) 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 }