summaryrefslogtreecommitdiffstats
path: root/nms-patches/TileEntityBanner.patch
blob: 4f501b82dec8216b2bbb64a59fe6bf6add1ebb3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- a/net/minecraft/server/TileEntityBanner.java
+++ b/net/minecraft/server/TileEntityBanner.java
@@ -30,6 +30,11 @@
 
         if (nbttagcompound != null && nbttagcompound.hasKeyOfType("Patterns", 9)) {
             this.patterns = nbttagcompound.getList("Patterns", 10).c();
+            // CraftBukkit start
+            while (this.patterns.size() > 20) {
+                this.patterns.remove(20);
+            }
+            // CraftBukkit end
         }
 
         this.color = enumcolor;
@@ -79,6 +84,11 @@
         }
 
         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;