mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Add config to only lobotomize villagers that have been traded with (#1466)
This commit is contained in:
@@ -1777,10 +1777,10 @@ index 384e7b29215cadfa40af07a183a9c9c6a5b4a80a..bf7ef72a7d92db8f11789a6958327064
|
||||
if ((this.tickCount + this.getId()) % 120 == 0) {
|
||||
Warden.applyDarknessAround(worldserver, this.position(), this, 20);
|
||||
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 ceda40e0246830155d13f36073b0ba45a5146de6..795a91cf05dc4f5fba84eaa501e8163fd99bf2c5 100644
|
||||
index 857d1d80afd35d30a2947b0a6f953e5af1516048..18f92478f07de7c941ff8bbe0ec2ef2fe3617fd7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -342,7 +342,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -343,7 +343,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
}
|
||||
protected void customServerAiStep(boolean inactive) { // Purpur - not final
|
||||
// Paper end
|
||||
@@ -1789,7 +1789,7 @@ index ceda40e0246830155d13f36073b0ba45a5146de6..795a91cf05dc4f5fba84eaa501e8163f
|
||||
// Purpur start
|
||||
if (this.level().purpurConfig.villagerLobotomizeEnabled) {
|
||||
// treat as inactive if lobotomized
|
||||
@@ -354,7 +354,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -355,7 +355,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
this.getBrain().tick((ServerLevel) this.level(), this); // Paper
|
||||
} else if (this.isLobotomized && shouldRestock()) restock();
|
||||
// Purpur end
|
||||
|
||||
Reference in New Issue
Block a user