Skip to content

Commit

Permalink
Add migration for older ids.
Browse files Browse the repository at this point in the history
Some id for biome objects were created with capital letters. This change will remove them via migration.
  • Loading branch information
BONNe committed Jan 26, 2022
1 parent b87e13f commit 87dd28b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ private boolean migrateBiomes(World world)

for (BiomesObject biomesObject : objectList)
{
if (biomesObject.getUniqueId().matches("(.*[A-Z].*)"))
{
this.biomesCache.remove(biomesObject.getUniqueId());
this.biomesDatabase.deleteObject(biomesObject);

biomesObject.setUniqueId(biomesObject.getUniqueId().toLowerCase());
this.saveBiome(biomesObject);
this.loadBiomes(biomesObject);
}

// Migrate to the new format.
if (biomesObject.getRequiredLevel() != null)
{
Expand Down

0 comments on commit 87dd28b

Please sign in to comment.