mirror of
https://github.com/PaperMC/Paper.git
synced 2025-09-02 13:23:50 -07:00
Don't filter out -1 data in ItemStack. Fixes BUKKIT-3824
This commit is contained in:
@@ -156,7 +156,7 @@ public final class ItemStack {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(this.usesData() || Item.byId[this.id].o() || this.id > 256)) { // Should be canBeDepleted
|
||||
if (!(this.usesData() || Item.byId[this.id].o() || this.id > 255)) { // Should be usesDurability
|
||||
i = 0;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ public final class ItemStack {
|
||||
// CraftBukkit end
|
||||
|
||||
this.damage = i;
|
||||
if (this.damage < 0) {
|
||||
if (this.damage < -1) { // CraftBukkit - don't filter -1, we use it
|
||||
this.damage = 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user