Add mapped and unmapped identifier read method (#3756)

This commit is contained in:
EnZaXD 2024-03-24 12:14:42 +01:00 committed by GitHub
parent 098f7ff3c2
commit f2c816df72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}