use of rtg.api.world.deco.DecoBase in project Realistic-Terrain-Generation by Team-RTG.
the class RealisticBiomeBase method rDecorate.
public void rDecorate(RTGWorld rtgWorld, Random rand, int worldX, int worldZ, float strength, float river, boolean hasPlacedVillageBlocks) {
ArrayList<DecoBase> decos = this.getDecos();
for (DecoBase deco : decos) {
decoStack.add(new ChunkDecoration(new ChunkPos(worldX, worldZ), deco));
if (decoStack.size() > 20) {
String problem = "";
for (ChunkDecoration inStack : decoStack) {
problem += "" + inStack.chunkLocation.toString() + " " + inStack.decoration.getClass().getSimpleName();
}
throw new RuntimeException(problem);
}
if (deco.preGenerate(this, rtgWorld, rand, worldX, worldZ, strength, river, hasPlacedVillageBlocks)) {
deco.generate(this, rtgWorld, rand, worldX, worldZ, strength, river, hasPlacedVillageBlocks);
}
decoStack.remove(decoStack.size() - 1);
}
}