aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0474-Villager-resetOffers.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2023-09-24 12:35:16 +1000
committerNassim Jahnke <[email protected]>2023-09-24 12:35:16 +1000
commit2ec643a53ceae5960a1b128aad9f177f6ae81ed7 (patch)
tree2a62189af40a2f5ad36e5f0d3641bff81578a94b /patches/server/0474-Villager-resetOffers.patch
parent6be43952eb6088a3f0c9a04ede96707e720203e3 (diff)
downloadPaper-2ec643a53ceae5960a1b128aad9f177f6ae81ed7.tar.gz
Paper-2ec643a53ceae5960a1b128aad9f177f6ae81ed7.zip
Readd anti xray and oversized block entity patches
Diffstat (limited to 'patches/server/0474-Villager-resetOffers.patch')
-rw-r--r--patches/server/0474-Villager-resetOffers.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/patches/server/0474-Villager-resetOffers.patch b/patches/server/0474-Villager-resetOffers.patch
new file mode 100644
index 0000000000..ba42f14185
--- /dev/null
+++ b/patches/server/0474-Villager-resetOffers.patch
@@ -0,0 +1,40 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: William Blake Galbreath <[email protected]>
+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 8f2d68890297521274a5c23daa272f0341427eec..629b79c6e59944994295768904c449733764cf99 100644
+--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
++++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
+@@ -114,6 +114,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
+ return this.tradingPlayer != null;
+ }
+
++ // Paper start
++ public void resetOffers() {
++ this.offers = new MerchantOffers();
++ this.updateTrades();
++ }
++ // Paper end
++
+ @Override
+ public MerchantOffers getOffers() {
+ if (this.offers == null) {
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
+index 1467232779541a9e38420caabf273662f380794c..762354681315e4c74e414bf7d677b5422385161e 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
+@@ -70,4 +70,11 @@ public class CraftAbstractVillager extends CraftAgeable implements AbstractVilla
+ public HumanEntity getTrader() {
+ return this.getMerchant().getTrader();
+ }
++
++ // Paper start
++ @Override
++ public void resetOffers() {
++ getHandle().resetOffers();
++ }
++ // Paper end
+ }