save stuff here

This commit is contained in:
Ben Kerllenevich
2023-06-09 00:01:03 -04:00
parent 0b3c94c72d
commit 8768f54932
159 changed files with 4276 additions and 3663 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable villager breeding
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index e258d5b83e5cb517b9fe2e2818391f0666cacd84..26d7b7de2dc2b59224311bc9541a5f0f0f386277 100644
index 813b9708d218589afaaa2d0578affcc78f0c075f..52a84f354cc51b3ca875756514588b2e6309fc25 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -779,7 +779,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -13,27 +13,27 @@ index e258d5b83e5cb517b9fe2e2818391f0666cacd84..26d7b7de2dc2b59224311bc9541a5f0f
@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
+ return this.level().purpurConfig.villagerCanBreed && this.foodLevel + this.countFoodPointsInInventory() >= 12 && !this.isSleeping() && this.getAge() == 0; // Purpur
}
private boolean hungry() {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 4f5f144127787b5deaca89f5fa97551c8caf4c28..da232210c18f9389dd51a30f4bf72b4e913513c2 100644
index 93aaa9d4413e10af4cb1fca15bc9627a7ded3955..a5d7a2e70068b08b49e7ccddbe222ca808f693b7 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1201,6 +1201,7 @@ public class PurpurWorldConfig {
@@ -1607,6 +1607,7 @@ public class PurpurWorldConfig {
public double villagerMaxHealth = 20.0D;
public boolean villagerFollowEmeraldBlock = false;
public boolean villagerCanBeLeashed = false;
+ public boolean villagerCanBreed = true;
private void villagerSettings() {
if (PurpurConfig.version < 10) {
double oldValue = getDouble("mobs.villager.attributes.max-health", villagerMaxHealth);
@@ -1210,6 +1211,7 @@ public class PurpurWorldConfig {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -1619,6 +1620,7 @@ public class PurpurWorldConfig {
villagerMaxHealth = getDouble("mobs.villager.attributes.max_health", villagerMaxHealth);
villagerFollowEmeraldBlock = getBoolean("mobs.villager.follow-emerald-blocks", villagerFollowEmeraldBlock);
villagerCanBeLeashed = getBoolean("mobs.villager.can-be-leashed", villagerCanBeLeashed);
+ villagerCanBreed = getBoolean("mobs.villager.can-breed", villagerCanBreed);
}
public double vindicatorMaxHealth = 24.0D;
public boolean vindicatorRidable = false;