diff options
Diffstat (limited to 'nms-patches/TileEntityBanner.patch')
-rw-r--r-- | nms-patches/TileEntityBanner.patch | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/nms-patches/TileEntityBanner.patch b/nms-patches/TileEntityBanner.patch index caf443b0..c9294ee0 100644 --- a/nms-patches/TileEntityBanner.patch +++ b/nms-patches/TileEntityBanner.patch @@ -1,26 +1,26 @@ --- a/net/minecraft/server/TileEntityBanner.java +++ b/net/minecraft/server/TileEntityBanner.java -@@ -21,6 +21,11 @@ +@@ -23,6 +23,11 @@ - if (nbttagcompound.hasKey("Patterns")) { - this.patterns = nbttagcompound.getList("Patterns", 10).d(); -+ // CraftBukkit start -+ while (this.patterns.size() > 20) { -+ this.patterns.remove(20); -+ } -+ // CraftBukkit end - } + if (nbttagcompound != null && nbttagcompound.hasKeyOfType("Patterns", 9)) { + this.patterns = nbttagcompound.getList("Patterns", 10).d(); ++ // CraftBukkit start ++ while (this.patterns.size() > 20) { ++ this.patterns.remove(20); ++ } ++ // CraftBukkit end + } - if (nbttagcompound.hasKeyOfType("Base", 99)) { -@@ -56,6 +61,11 @@ - super.a(nbttagcompound); - this.color = nbttagcompound.getInt("Base"); + this.color = flag ? d(itemstack) : ItemBanner.c(itemstack); +@@ -67,6 +72,11 @@ + + this.color = EnumColor.fromInvColorIndex(nbttagcompound.getInt("Base")); this.patterns = nbttagcompound.getList("Patterns", 10); + // CraftBukkit start + while (this.patterns.size() > 20) { + this.patterns.remove(20); + } + // CraftBukkit end - this.h = null; this.i = null; this.j = null; + this.k = null; |