mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
SPIGOT-6708: Fix Experience Orb value not being updated in mend event
By: Phoenix616 <max@themoep.de>
This commit is contained in:
parent
9d22657139
commit
77dcaefa51
1 changed files with 6 additions and 2 deletions
|
@ -54,7 +54,7 @@
|
|||
}
|
||||
|
||||
--this.count;
|
||||
@@ -243,6 +265,13 @@
|
||||
@@ -243,9 +265,17 @@
|
||||
if (entry != null) {
|
||||
ItemStack itemstack = (ItemStack) entry.getValue();
|
||||
int j = Math.min(this.c(this.value), itemstack.getDamage());
|
||||
|
@ -68,7 +68,11 @@
|
|||
|
||||
itemstack.setDamage(itemstack.getDamage() - j);
|
||||
int k = i - this.b(j);
|
||||
@@ -270,6 +299,24 @@
|
||||
+ this.value = k; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls
|
||||
|
||||
return k > 0 ? this.a(entityhuman, k) : 0;
|
||||
} else {
|
||||
@@ -270,6 +300,24 @@
|
||||
}
|
||||
|
||||
public static int getOrbValue(int i) {
|
||||
|
|
Loading…
Add table
Reference in a new issue