Search in sources :

Example 1 with DecoBase

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);
    }
}
Also used : ChunkPos(net.minecraft.util.math.ChunkPos) DecoBase(rtg.api.world.deco.DecoBase)

Aggregations

ChunkPos (net.minecraft.util.math.ChunkPos)1 DecoBase (rtg.api.world.deco.DecoBase)1