fix: Return early in banner translation if tag is null (#2729)

This commit is contained in:
Olivia 2021-12-25 16:16:30 -06:00 committed by GitHub
parent 65aaa07493
commit b134dd3b1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,6 +41,10 @@ public class BannerBlockEntityTranslator extends BlockEntityTranslator implement
builder.put("Base", 15 - bannerColor);
}
if (tag == null) {
return;
}
if (tag.contains("Patterns")) {
ListTag patterns = tag.get("Patterns");
if (patterns.equals(BannerTranslator.OMINOUS_BANNER_PATTERN)) {