2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
|
|
Date: Mon, 7 Oct 2019 00:15:37 -0500
|
|
|
|
Subject: [PATCH] Villager#resetOffers
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
2024-10-23 17:13:43 +02:00
|
|
|
index 3cdd48c35d50fa3107e0f2bf439e75b7f306b3d1..c8231e421e6c3f1cf8a5aaf8cc64741abe868f41 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
2024-09-15 21:39:53 +02:00
|
|
|
@@ -114,6 +114,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
2021-06-11 14:02:28 +02:00
|
|
|
return this.tradingPlayer != null;
|
|
|
|
}
|
|
|
|
|
2024-01-20 12:50:16 +01:00
|
|
|
+ // Paper start - Villager#resetOffers
|
2021-06-11 14:02:28 +02:00
|
|
|
+ public void resetOffers() {
|
|
|
|
+ this.offers = new MerchantOffers();
|
|
|
|
+ this.updateTrades();
|
|
|
|
+ }
|
2024-01-20 12:50:16 +01:00
|
|
|
+ // Paper end - Villager#resetOffers
|
2021-06-11 14:02:28 +02:00
|
|
|
+
|
|
|
|
@Override
|
|
|
|
public MerchantOffers getOffers() {
|
2024-06-13 22:57:13 +02:00
|
|
|
if (this.level().isClientSide) {
|
2021-06-11 14:02:28 +02:00
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
|
2024-09-15 21:39:53 +02:00
|
|
|
index e5f733a765068b5640e811abf9fda945a9e91c7c..3199f04d00836a0a51547c679f3f3c80d00da502 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
|
2024-09-15 21:39:53 +02:00
|
|
|
@@ -34,4 +34,11 @@ public class CraftAbstractVillager extends CraftAgeable implements CraftMerchant
|
|
|
|
public Inventory getInventory() {
|
|
|
|
return new CraftInventory(this.getHandle().getInventory());
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
+
|
2024-01-20 12:50:16 +01:00
|
|
|
+ // Paper start - Villager#resetOffers
|
2021-06-11 14:02:28 +02:00
|
|
|
+ @Override
|
|
|
|
+ public void resetOffers() {
|
|
|
|
+ getHandle().resetOffers();
|
|
|
|
+ }
|
2024-01-20 12:50:16 +01:00
|
|
|
+ // Paper end - Villager#resetOffers
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|