Some cleanup

This commit is contained in:
Nassim Jahnke 2024-04-30 09:02:24 +02:00
parent 1864b66e42
commit 4854b131b8
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
2 changed files with 3 additions and 8 deletions

View File

@ -62,7 +62,7 @@ public class ItemType1_20_5 extends Type<Item> {
return new Reference2ObjectOpenHashMap<>();
}
final Map<StructuredDataKey<?>, StructuredData<?>> map = new Reference2ObjectOpenHashMap<>(valuesSize + markersSize);
final Map<StructuredDataKey<?>, StructuredData<?>> map = new Reference2ObjectOpenHashMap<>();
for (int i = 0; i < valuesSize; i++) {
final StructuredData<?> value = dataType.read(buffer);
final StructuredDataKey<?> key = dataType.key(value.id());

View File

@ -430,13 +430,8 @@ public final class StructuredDataConverter {
return true;
}
String identifier = BannerPatterns1_20_5.idToKey(layer.pattern().id());
if (identifier == null) {
return true;
}
identifier = Key.stripMinecraftNamespace(identifier);
return identifier.equals("flow") || identifier.equals("guster");
final String identifier = BannerPatterns1_20_5.idToKey(layer.pattern().id());
return identifier == null || identifier.equals("flow") || identifier.equals("guster");
})) {
final ListTag<CompoundTag> originalPatterns = new ListTag<>(CompoundTag.class);
for (final BannerPatternLayer layer : data) {