Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
SPIGOT-3945: Remove RepairCost tag when cost is 0
Dieser Commit ist enthalten in:
Ursprung
d0a3620c2d
Commit
8cc5a7ecb6
@ -303,7 +303,22 @@
|
|||||||
|
|
||||||
itemstack.d(this.D());
|
itemstack.d(this.D());
|
||||||
if (this.tag != null) {
|
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);
|
nbttaglist.add(nbttagcompound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren