mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Configurable villager breeding
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user