Fix null errors related to Migrations

This commit is contained in:
zontreck 2024-04-23 23:40:54 -07:00
parent 965bea2982
commit a3d4ae321e
3 changed files with 4 additions and 4 deletions

View file

@ -53,7 +53,7 @@ mod_name=Zontreck's Library Mod
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=GPLv3
# The mod version. See https://semver.org/
mod_version=1201.13.042324.2323
mod_version=1201.13.042324.2339
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View file

@ -15,8 +15,8 @@ public class RegisterMigrationsEvent extends Event
migrations.add(migration);
}
public DatabaseMigrations.Migration[] getMigrations()
public List<DatabaseMigrations.Migration> getMigrations()
{
return (DatabaseMigrations.Migration[]) migrations.toArray();
return new ArrayList<>(migrations);
}
}

View file

@ -122,7 +122,7 @@ public class DatabaseMigrations
MinecraftForge.EVENT_BUS.post(rme);
migrations.addAll(Lists.reverse(List.of(rme.getMigrations())));
migrations.addAll(rme.getMigrations());
executeMigrations();