mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 9a129fa99 Add #getEligibleHumans to SkeletonHorseTrapEvent b5e23c7a6 Fix merging spawning values a932e8ad7 Turn off spigot verbose world by default 8ced89f65 Fix Delegation to vanilla chunk gen
44 lines
2.5 KiB
Diff
44 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Mon, 10 Aug 2020 13:54:05 -0500
|
|
Subject: [PATCH] Add option to reset reputation when villager is cured
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
index 7cf6d4a4cd..5dd9e3bb20 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
@@ -39,7 +39,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
|
@Nullable
|
|
private EntityHuman bv;
|
|
private byte bx;
|
|
- private final Reputation by;
|
|
+ private Reputation by; // Purpur - remove final
|
|
private long bz;
|
|
private long bA;
|
|
private int bB;
|
|
@@ -942,6 +942,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
|
@Override
|
|
public void a(ReputationEvent reputationevent, Entity entity) {
|
|
if (reputationevent == ReputationEvent.a) {
|
|
+ if (world.purpurConfig.zombieVillagerResetReputationsWhenCured) this.by = new Reputation(); // Purpur
|
|
this.by.a(entity.getUniqueID(), ReputationType.MAJOR_POSITIVE, 20);
|
|
this.by.a(entity.getUniqueID(), ReputationType.MINOR_POSITIVE, 25);
|
|
} else if (reputationevent == ReputationEvent.e) {
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 226d64798f..a41cc6da74 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -543,9 +543,11 @@ public class PurpurWorldConfig {
|
|
public boolean zombieVillagerJockeyOnlyBaby = true;
|
|
public double zombieVillagerJockeyChance = 0.05D;
|
|
public boolean zombieVillagerJockeyTryExistingChickens = true;
|
|
+ public boolean zombieVillagerResetReputationsWhenCured = false;
|
|
private void zombieVillagerSettings() {
|
|
zombieVillagerJockeyOnlyBaby = getBoolean("mobs.zombie_villager.jockey.only-babies", zombieVillagerJockeyOnlyBaby);
|
|
zombieVillagerJockeyChance = getDouble("mobs.zombie_villager.jockey.chance", zombieVillagerJockeyChance);
|
|
zombieVillagerJockeyTryExistingChickens = getBoolean("mobs.zombie_villager.jockey.try-existing-chickens", zombieVillagerJockeyTryExistingChickens);
|
|
+ zombieVillagerResetReputationsWhenCured = getBoolean("mobs.zombie_villager.reset-reputation-when-cured", zombieVillagerResetReputationsWhenCured);
|
|
}
|
|
}
|