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
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
2021-06-14 18:58:00 +02:00
|
|
|
@@ -0,0 +0,0 @@ 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
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
|
|
|
|
@@ -0,0 +0,0 @@ public class CraftAbstractVillager extends CraftAgeable implements AbstractVilla
|
|
|
|
public HumanEntity getTrader() {
|
2021-06-14 18:58:00 +02:00
|
|
|
return this.getMerchant().getTrader();
|
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
|
|
|
}
|