diff --git a/mobs/cat.lua b/mobs/cat.lua index a264f65..f38f432 100644 --- a/mobs/cat.lua +++ b/mobs/cat.lua @@ -182,7 +182,8 @@ creatura.register_mob("animalia:cat", { [7] = { utility = "animalia:mammal_breed", get_score = function(self) - if self.breeding then + if self.breeding + and animalia.get_nearby_mate(self, self.name) then return 0.7, {self} end return 0 diff --git a/mobs/chicken.lua b/mobs/chicken.lua index ff08889..e95c388 100644 --- a/mobs/chicken.lua +++ b/mobs/chicken.lua @@ -124,7 +124,8 @@ creatura.register_mob("animalia:chicken", { [5] = { utility = "animalia:bird_breed", get_score = function(self) - if self.breeding then + if self.breeding + and animalia.get_nearby_mate(self, self.name) then return 0.9, {self} end return 0 diff --git a/mobs/frog.lua b/mobs/frog.lua index af6f7b0..d05a569 100644 --- a/mobs/frog.lua +++ b/mobs/frog.lua @@ -106,6 +106,7 @@ creatura.register_mob("animalia:frog", { utility = "animalia:breed_water_surface", get_score = function(self) if self.breeding + and animalia.get_nearby_mate(self, self.name) and self.in_liquid then return 1 end diff --git a/mobs/horse.lua b/mobs/horse.lua index b03a114..0a6a0ff 100644 --- a/mobs/horse.lua +++ b/mobs/horse.lua @@ -168,7 +168,8 @@ creatura.register_mob("animalia:horse", { [5] = { utility = "animalia:horse_breed", get_score = function(self) - if self.breeding then + if self.breeding + and animalia.get_nearby_mate(self, self.name) then return 0.9, {self} end return 0 diff --git a/mobs/pig.lua b/mobs/pig.lua index 1a7ad83..80b121d 100644 --- a/mobs/pig.lua +++ b/mobs/pig.lua @@ -133,7 +133,8 @@ creatura.register_mob("animalia:pig", { [5] = { utility = "animalia:mammal_breed", get_score = function(self) - if self.breeding then + if self.breeding + and animalia.get_nearby_mate(self, self.name) then return 0.9, {self} end return 0 diff --git a/mobs/reindeer.lua b/mobs/reindeer.lua index fba8714..f21ac7d 100644 --- a/mobs/reindeer.lua +++ b/mobs/reindeer.lua @@ -110,7 +110,8 @@ creatura.register_mob("animalia:reindeer", { [5] = { utility = "animalia:mammal_breed", get_score = function(self) - if self.breeding then + if self.breeding + and animalia.get_nearby_mate(self, self.name) then return 0.9, {self} end return 0 diff --git a/mobs/sheep.lua b/mobs/sheep.lua index cfbb09f..02728bd 100644 --- a/mobs/sheep.lua +++ b/mobs/sheep.lua @@ -153,7 +153,8 @@ creatura.register_mob("animalia:sheep", { [5] = { utility = "animalia:mammal_breed", get_score = function(self) - if self.breeding then + if self.breeding + and animalia.get_nearby_mate(self, self.name) then return 0.9, {self} end return 0 diff --git a/mobs/turkey.lua b/mobs/turkey.lua index 2bb162d..1e2b2e5 100644 --- a/mobs/turkey.lua +++ b/mobs/turkey.lua @@ -115,7 +115,8 @@ creatura.register_mob("animalia:turkey", { [5] = { utility = "animalia:bird_breed", get_score = function(self) - if self.breeding then + if self.breeding + and animalia.get_nearby_mate(self, self.name) then return 0.9, {self} end return 0 diff --git a/mobs/wolf.lua b/mobs/wolf.lua index 7a573ec..c887a0a 100644 --- a/mobs/wolf.lua +++ b/mobs/wolf.lua @@ -158,7 +158,8 @@ creatura.register_mob("animalia:wolf", { [7] = { utility = "animalia:mammal_breed", get_score = function(self) - if self.breeding then + if self.breeding + and animalia.get_nearby_mate(self, self.name) then return 0.7, {self} end return 0