mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
SPIGOT-1068: Limit the number of patterns on banners
This commit is contained in:
1 parent
dc40c528d7
commit
2642f9b344
2 files changed
+28
-2
No files matched your search
@@ -50,8 +50,8 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
|
||||
|
||||
if (entityTag.hasKey(PATTERNS.NBT)) {
|
||||
NBTTagList patterns = entityTag.getList(PATTERNS.NBT, 10);
|
||||
for (int i = 0; i < patterns.size(); i++) {
|
||||
NBTTagCompound p = (NBTTagCompound) patterns.get(i);
|
||||
for (int i = 0; i < Math.min(patterns.size(), 20); i++) {
|
||||
NBTTagCompound p = patterns.get(i);
|
||||
this.patterns.add(new Pattern(DyeColor.getByDyeData((byte) p.getInt(COLOR.NBT)), PatternType.getByIdentifier(p.getString(PATTERN.NBT))));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user