Configurable villager breeding

This commit is contained in:
draycia
2025-01-07 18:00:44 -08:00
committed by granny
parent f04709de78
commit cafc3de487
3 changed files with 11 additions and 39 deletions

View File

@@ -14,3 +14,12 @@
@Override
public Brain<Villager> getBrain() {
return (Brain<Villager>)super.getBrain();
@@ -707,7 +_,7 @@
@Override
public boolean canBreed() {
- return this.foodLevel + this.countFoodPointsInInventory() >= 12 && !this.isSleeping() && this.getAge() == 0;
+ return this.level().purpurConfig.villagerCanBreed && this.foodLevel + this.countFoodPointsInInventory() >= 12 && !this.isSleeping() && this.getAge() == 0; // Purpur - Configurable villager breeding
}
private boolean hungry() {

View File

@@ -1748,6 +1748,7 @@ public class PurpurWorldConfig {
public boolean villagerFollowEmeraldBlock = false;
public double villagerTemptRange = 10.0D;
public boolean villagerCanBeLeashed = false;
public boolean villagerCanBreed = true;
private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -1762,6 +1763,7 @@ public class PurpurWorldConfig {
villagerFollowEmeraldBlock = getBoolean("mobs.villager.follow-emerald-blocks", villagerFollowEmeraldBlock);
villagerTemptRange = getDouble("mobs.villager.attributes.tempt_range", villagerTemptRange);
villagerCanBeLeashed = getBoolean("mobs.villager.can-be-leashed", villagerCanBeLeashed);
villagerCanBreed = getBoolean("mobs.villager.can-breed", villagerCanBreed);
}
public boolean vindicatorRidable = false;