3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 00:22:51 +01:00

Add mapped and unmapped identifier read method (#3756)

Dieser Commit ist enthalten in:
EnZaXD 2024-03-24 12:14:42 +01:00 committet von GitHub
Ursprung 098f7ff3c2
Commit f2c816df72
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -82,8 +82,8 @@ public class MappingDataBase implements MappingData {
attributeMappings = loadMappings(data, "attributes");
itemMappings = loadBiMappings(data, "items");
final CompoundTag unmappedIdentifierData = readIdentifiersFile("identifiers-" + unmappedVersion + ".nbt");
final CompoundTag mappedIdentifierData = readIdentifiersFile("identifiers-" + mappedVersion + ".nbt");
final CompoundTag unmappedIdentifierData = readUnmappedIdentifiersFile("identifiers-" + unmappedVersion + ".nbt");
final CompoundTag mappedIdentifierData = readMappedIdentifiersFile("identifiers-" + mappedVersion + ".nbt");
if (unmappedIdentifierData != null && mappedIdentifierData != null) {
entityMappings = loadFullMappings(data, unmappedIdentifierData, mappedIdentifierData, "entities");
argumentTypeMappings = loadFullMappings(data, unmappedIdentifierData, mappedIdentifierData, "argumenttypes");
@ -118,7 +118,11 @@ public class MappingDataBase implements MappingData {
return MappingDataLoader.INSTANCE.loadNBT(name);
}
protected @Nullable CompoundTag readIdentifiersFile(final String name) {
protected @Nullable CompoundTag readUnmappedIdentifiersFile(final String name) {
return MappingDataLoader.INSTANCE.loadNBT(name, true);
}
protected @Nullable CompoundTag readMappedIdentifiersFile(final String name) {
return MappingDataLoader.INSTANCE.loadNBT(name, true);
}