From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath 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 @@ -0,0 +0,0 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa return this.tradingPlayer != null; } + // Paper start - Villager#resetOffers + public void resetOffers() { + this.offers = new MerchantOffers(); + this.updateTrades(); + } + // Paper end - Villager#resetOffers + @Override public MerchantOffers getOffers() { if (this.level().isClientSide) { 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 CraftMerchant public Inventory getInventory() { return new CraftInventory(this.getHandle().getInventory()); } + + // Paper start - Villager#resetOffers + @Override + public void resetOffers() { + getHandle().resetOffers(); + } + // Paper end - Villager#resetOffers }