Change "blocks" key in palettes to "layers"

This commit is contained in:
dfsek 2020-10-11 14:06:59 -07:00
parent a50bfdc6a1
commit 534b83e36b
3 changed files with 7 additions and 7 deletions

View File

@ -49,13 +49,13 @@ public class CarverConfig extends TerraConfig {
if(!contains("id")) throw new ConfigException("No ID specified for Carver!", "null");
id = getString("id");
inner = getBlocks("palette.inner.blocks");
inner = getBlocks("palette.inner.layers");
outer = getBlocks("palette.outer.blocks");
outer = getBlocks("palette.outer.layers");
top = getBlocks("palette.top.blocks");
top = getBlocks("palette.top.layers");
bottom = getBlocks("palette.bottom.blocks");
bottom = getBlocks("palette.bottom.layers");
replaceableInner = ConfigUtil.toBlockData(getStringList("palette.inner.replace"), "replaceable inner", getID());

View File

@ -36,7 +36,7 @@ public class FloraConfig extends TerraConfig implements Flora {
load(file);
if(!contains("id")) throw new ConfigException("Flora ID unspecified!", "null");
this.id = getString("id");
if(!contains("blocks")) throw new ConfigException("No blocks defined in custom flora!", getID());
if(!contains("layers")) throw new ConfigException("No blocks defined in custom flora!", getID());
if(!contains("spawnable")) throw new ConfigException("Flora spawnable blocks unspecified!", getID());
spawnable = ConfigUtil.toBlockData(getStringList("spawnable"), "spawnable", getID());
@ -46,7 +46,7 @@ public class FloraConfig extends TerraConfig implements Flora {
Palette<BlockData> p = new RandomPalette<>(new Random(getInt("seed", 4)));
floraPalette = PaletteConfig.getPalette(getMapList("blocks"), p);
floraPalette = PaletteConfig.getPalette(getMapList("layers"), p);
}
public String getID() {

View File

@ -36,7 +36,7 @@ public class PaletteConfig extends TerraConfig {
pNoise.setFrequency((float) getDouble("frequency", 0.02));
pal = new SimplexPalette<>(pNoise);
} else pal = new RandomPalette<>(new Random(getInt("seed", 2403)));
palette = getPalette(getMapList("blocks"), pal);
palette = getPalette(getMapList("layers"), pal);
}
public Palette<BlockData> getPalette() {