aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0809-Fix-anvil-prepare-event-not-working-with-zero-xp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0809-Fix-anvil-prepare-event-not-working-with-zero-xp.patch')
-rw-r--r--patches/server/0809-Fix-anvil-prepare-event-not-working-with-zero-xp.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0809-Fix-anvil-prepare-event-not-working-with-zero-xp.patch b/patches/server/0809-Fix-anvil-prepare-event-not-working-with-zero-xp.patch
new file mode 100644
index 0000000000..408215402f
--- /dev/null
+++ b/patches/server/0809-Fix-anvil-prepare-event-not-working-with-zero-xp.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jan Tuck <[email protected]>
+Date: Mon, 15 Nov 2021 15:20:41 -0500
+Subject: [PATCH] Fix anvil prepare event not working with zero xp
+
+
+diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
+index b40377e882d9cc3571f527e706862e27c59b1fd0..073cec4838b88bf4e7444321a74ab73fff732486 100644
+--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
++++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
+@@ -59,7 +59,7 @@ public class AnvilMenu extends ItemCombinerMenu {
+
+ @Override
+ protected boolean mayPickup(Player player, boolean present) {
+- return (player.getAbilities().instabuild || player.experienceLevel >= this.cost.get()) && this.cost.get() > 0;
++ return (player.getAbilities().instabuild || player.experienceLevel >= this.cost.get()) && this.cost.get() >= 0; // Paper - fix anvil prepare event not working with 0 xp
+ }
+
+ @Override