mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-30 20:39:21 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b0da38c2 Repository details in RuntimeException for MavenLibraryResolver#addRepository (#12939) PaperMC/Paper@1922be90 Update custom tags (#12183) PaperMC/Paper@79cf1353 Ignore HopperInventorySearchEvent when it has no listeners (#13009) PaperMC/Paper@ea014f7a feat: add stuckEntityPoiRetryDelay config (#12949) PaperMC/Paper@a9e76749 Support for showNotification in PlayerRecipeDiscoverEvent (#12992) PaperMC/Paper@5622c9dd Expose attribute sentiment (#12974) PaperMC/Paper@42b653b1 Expose more argument types (#12665) PaperMC/Paper@52d9a221 [ci/skip] Fix typo in Display javadoc (#13010) PaperMC/Paper@614e9acf Improve APIs around riptide tridents (#12996) PaperMC/Paper@51706e5a Fixed DyeItem sheep dye hunk
50 lines
2.9 KiB
Diff
50 lines
2.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
|
Date: Tue, 9 Nov 2077 00:00:00 +0800
|
|
Subject: [PATCH] Use UUID for cure reputation
|
|
|
|
Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-247647
|
|
|
|
diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
index 22c1545a0329d56e0ec41ae4da1e1922aa1f9737..e89e4c26c40cbb3ef002022f22886d5faa7869fd 100644
|
|
--- a/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
+++ b/net/minecraft/world/entity/monster/ZombieVillager.java
|
|
@@ -283,9 +283,10 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
|
|
mob.refreshBrain(level);
|
|
if (this.conversionStarter != null) {
|
|
Player playerByUuid = level.getGlobalPlayerByUUID(this.conversionStarter); // Paper - check global player list where appropriate
|
|
+ mob.onReputationEventFromUUID(ReputationEventType.ZOMBIE_VILLAGER_CURED, this.conversionStarter); // Leaf - Use UUID for cure reputation
|
|
if (playerByUuid instanceof ServerPlayer) {
|
|
CriteriaTriggers.CURED_ZOMBIE_VILLAGER.trigger((ServerPlayer)playerByUuid, this, mob);
|
|
- level.onReputationEvent(ReputationEventType.ZOMBIE_VILLAGER_CURED, playerByUuid, mob);
|
|
+ //level.onReputationEvent(ReputationEventType.ZOMBIE_VILLAGER_CURED, playerByUuid, mob); // Leaf - Use UUID for cure reputation - move up
|
|
}
|
|
}
|
|
|
|
diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
|
|
index a4fc8d4d17971643921e91438f527a2551d51808..b0c7bd4c38561194edfa003a1fc942a6fab5ce72 100644
|
|
--- a/net/minecraft/world/entity/npc/Villager.java
|
|
+++ b/net/minecraft/world/entity/npc/Villager.java
|
|
@@ -1094,6 +1094,21 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
|
}
|
|
}
|
|
|
|
+ // Leaf start - Use UUID for cure reputation
|
|
+ public void onReputationEventFromUUID(ReputationEventType type, java.util.UUID target) {
|
|
+ if (type == ReputationEventType.ZOMBIE_VILLAGER_CURED) {
|
|
+ this.gossips.add(target, GossipType.MAJOR_POSITIVE, 20);
|
|
+ this.gossips.add(target, GossipType.MINOR_POSITIVE, 25);
|
|
+ } else if (type == ReputationEventType.TRADE) {
|
|
+ this.gossips.add(target, GossipType.TRADING, 2);
|
|
+ } else if (type == ReputationEventType.VILLAGER_HURT) {
|
|
+ this.gossips.add(target, GossipType.MINOR_NEGATIVE, 25);
|
|
+ } else if (type == ReputationEventType.VILLAGER_KILLED) {
|
|
+ this.gossips.add(target, GossipType.MAJOR_NEGATIVE, 25);
|
|
+ }
|
|
+ }
|
|
+ // Leaf end - Use UUID for cure reputation
|
|
+
|
|
@Override
|
|
public int getVillagerXp() {
|
|
return this.villagerXp;
|