diff options
author | blablubbabc <lukas@wirsindwir.de> | 2018-05-23 16:17:41 +0200 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-05-27 17:10:22 +1000 |
commit | 8cc5a7ecb6204e23bf883bb9282dd2b70e0f7858 (patch) | |
tree | 5efa885e86bbd58acbb7e5b9f93e102529835a30 | |
parent | d0a3620c2dc8a22438808f395348c100a183a618 (diff) | |
download | craftbukkit-8cc5a7ecb6204e23bf883bb9282dd2b70e0f7858.tar craftbukkit-8cc5a7ecb6204e23bf883bb9282dd2b70e0f7858.tar.gz craftbukkit-8cc5a7ecb6204e23bf883bb9282dd2b70e0f7858.tar.lz craftbukkit-8cc5a7ecb6204e23bf883bb9282dd2b70e0f7858.tar.xz craftbukkit-8cc5a7ecb6204e23bf883bb9282dd2b70e0f7858.zip |
SPIGOT-3945: Remove RepairCost tag when cost is 0
-rw-r--r-- | nms-patches/ItemStack.patch | 17 |
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); } |