Skip to content

Commit

Permalink
Fix crash when using a default grid colormap with mods that add biomes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kvverti committed Sep 21, 2021
1 parent 9f8c64d commit 7bfaa24
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public class ColormapProperties {
*/
private final Collection<ApplicableBlockStates> blocks;

/**s
/**
* s
* The colormap image. If not specified, it is taken from the file name
* of the properties file.
*/
Expand Down Expand Up @@ -196,13 +197,21 @@ public ColumnBounds getColumn(RegistryKey<Biome> biome) {
}
return cb;
} else {
return defaultColumns.get(id);
ColumnBounds defaultForBiome = defaultColumns.get(id);
if(defaultForBiome == null) {
// mod-added biomes just get the default without an override
// another fix is not to modify mod-added biomes colors at all with the standard
// grid format - which will be a much better fix when color stacking works properly
return DEFAULT_BOUNDS;
}
return defaultForBiome;
}
} else {
return DEFAULT_BOUNDS;
}
} else {
throw new IllegalStateException(format.toString());
}
throw new IllegalStateException(format.toString());
}

/**
Expand Down

0 comments on commit 7bfaa24

Please sign in to comment.