diff --git a/src/main/java/io/github/kvverti/colormatic/properties/ColormapProperties.java b/src/main/java/io/github/kvverti/colormatic/properties/ColormapProperties.java index 62519b1..07edc4c 100644 --- a/src/main/java/io/github/kvverti/colormatic/properties/ColormapProperties.java +++ b/src/main/java/io/github/kvverti/colormatic/properties/ColormapProperties.java @@ -70,7 +70,8 @@ public class ColormapProperties { */ private final Collection blocks; - /**s + /** + * s * The colormap image. If not specified, it is taken from the file name * of the properties file. */ @@ -196,13 +197,21 @@ public ColumnBounds getColumn(RegistryKey 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()); } /**