summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/ItemStack.patch17
1 files changed, 16 insertions, 1 deletions
diff --git a/nms-patches/ItemStack.patch b/nms-patches/ItemStack.patch
index 69343909..0e6dbd50 100644
--- a/nms-patches/ItemStack.patch
+++ b/nms-patches/ItemStack.patch
@@ -303,7 +303,22 @@
itemstack.d(this.D());
if (this.tag != null) {
-@@ -513,6 +719,12 @@
+@@ -464,6 +670,14 @@
+ }
+
+ public void setRepairCost(int i) {
++ // CraftBukkit start - remove RepairCost tag when 0 (SPIGOT-3945)
++ if (i == 0) {
++ if (this.hasTag()) {
++ this.tag.remove("RepairCost");
++ }
++ return;
++ }
++ // CraftBukkit end
+ if (!this.hasTag()) {
+ this.tag = new NBTTagCompound();
+ }
+@@ -513,6 +727,12 @@
nbttaglist.add(nbttagcompound);
}