Fix breeding

This commit is contained in:
ElCeejo 2022-02-22 20:27:38 -08:00 committed by GitHub
parent 1b028a6a47
commit 4e1cff6f28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 17 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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