Update to Minecraft 1.15.1

This commit is contained in:
md_5
2019-12-18 08:00:00 +11:00
parent e2790ae2ea
commit 30a1b6911f
9 changed files with 40 additions and 52 deletions

View File

@@ -287,19 +287,7 @@
public NBTTagCompound getOrCreateTag() {
if (this.tag == null) {
this.setTag(new NBTTagCompound());
@@ -386,6 +595,11 @@
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
this.tag = nbttagcompound;
+ // CraftBukkit start - ensure null tags do not get inappropriately used (SpigotCraft#463)
+ if (this.tag == null && this.item != null && this.item.usesDurability()) {
+ this.setDamage(this.getDamage());
+ }
+ // CraftBukkit end
}
public IChatBaseComponent getName() {
@@ -494,6 +708,12 @@
@@ -498,6 +707,12 @@
}
public void setRepairCost(int i) {
@@ -312,7 +300,7 @@
this.getOrCreateTag().setInt("RepairCost", i);
}
@@ -516,7 +736,7 @@
@@ -520,7 +735,7 @@
object = this.getItem().a(enumitemslot);
}
@@ -321,7 +309,7 @@
attributemodifier1.a(false);
});
return (Multimap) object;
@@ -539,6 +759,13 @@
@@ -543,6 +758,13 @@
nbttaglist.add(nbttagcompound);
}