mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 13:07:06 +01:00
Allow special crafting data value on items. Fixes BUKKIT-3780
This commit is contained in:
parent
5515b0ee2b
commit
737e8c5127
1 changed files with 6 additions and 0 deletions
|
@ -150,6 +150,12 @@ public final class ItemStack {
|
||||||
|
|
||||||
public void setData(int i) {
|
public void setData(int i) {
|
||||||
// CraftBukkit start - filter out data for items that shouldn't have it
|
// CraftBukkit start - filter out data for items that shouldn't have it
|
||||||
|
// The crafting system uses this value for a special purpose so we have to allow it
|
||||||
|
if (i == 32767) {
|
||||||
|
this.damage = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(this.usesData() || Item.byId[this.id].o())) { // Should be canBeDepleted
|
if (!(this.usesData() || Item.byId[this.id].o())) { // Should be canBeDepleted
|
||||||
i = 0;
|
i = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue