}
WorldGenAdvLakes r = new WorldGenAdvLakes(resList, useMaterial ? matList : null);
if (isObject) {
if (genObject.has("outlineWithStone"))
r.outlineBlock = genObject.get("outlineWithStone").getAsBoolean() ?
new WeightedRandomBlock(Blocks.stone, 0) : null;
if (genObject.has("outlineBlock"))
r.outlineBlock = FeatureParser.parseBlockEntry(genObject.get("outlineBlock"));
if (genObject.has("gapBlock"))
r.gapBlock = FeatureParser.parseBlockEntry(genObject.get("gapBlock"));
if (genObject.has("lineWithFiller"))
r.lineWithFiller = genObject.get("lineWithFiller").getAsBoolean();
}
return r;
} else if ("geode".equals(template)) {
ArrayList<WeightedRandomBlock> list = new ArrayList<WeightedRandomBlock>();
if (!entry.has("crust")) {
log.info("Entry does not specify crust for 'geode' generator. Using stone.");
list.add(new WeightedRandomBlock(Blocks.stone));
} else {
if (!FeatureParser.parseResList(entry.get("crust"), list)) {
log.warn("Entry specifies invalid crust for 'geode' generator! Using obsidian!");
list.clear();
list.add(new WeightedRandomBlock(Blocks.obsidian));
}
}
WorldGenGeode r = new WorldGenGeode(resList, matList, list);
if (isObject) {
if (genObject.has("hollow"))
r.hollow = genObject.get("hollow").getAsBoolean();
}
return r;
} else if ("decoration".equals(template)) {
ArrayList<WeightedRandomBlock> list = new ArrayList<WeightedRandomBlock>();
if (!entry.has("genSurface")) {
log.info("Entry does not specify genSurface for 'decoration' generator. Using grass.");
list.add(new WeightedRandomBlock(Blocks.grass));
} else {
if (!FeatureParser.parseResList(entry.get("crust"), list)) {
log.warn("Entry specifies invalid genSurface for 'decoration' generator! Using grass!");
list.clear();
list.add(new WeightedRandomBlock(Blocks.grass));
}
}
WorldGenDecoration r = new WorldGenDecoration(resList, clusterSize, matList, list);
if (genObject.has("genSky"))
r.seeSky = genObject.get("genSky").getAsBoolean();