Search in sources :

Example 1 with WorldGenTropicsTreasure

use of net.tropicraft.core.common.worldgen.WorldGenTropicsTreasure in project Tropicraft by Tropicraft.

the class BiomeDecoratorTropicsBeach method genDecorations.

@Override
public void genDecorations(Biome biome, World world, Random rand) {
    super.genDecorations(biome, world, rand);
    int i = 0;
    int k = 0;
    if (GenRates.NORMAL_PALM_CHANCE != 0 && rand.nextInt(GenRates.NORMAL_PALM_CHANCE) == 0) {
        i = chunkPos.getX() + 13 + rand.nextInt(5);
        k = chunkPos.getZ() + 13 + rand.nextInt(5);
        new WorldGenNormalPalms(world, rand).generate(new BlockPos(i, this.getTerrainHeightAt(world, i, k), k));
    }
    if (GenRates.CURVED_PALM_CHANCE != 0 && rand.nextInt(GenRates.CURVED_PALM_CHANCE) == 0) {
        i = chunkPos.getX() + 13 + rand.nextInt(5);
        k = chunkPos.getZ() + 13 + rand.nextInt(5);
        new WorldGenCurvedPalms(world, rand).generate(new BlockPos(i, this.getTerrainHeightAt(world, i, k), k));
    }
    if (GenRates.LARGE_PALM_CHANCE != 0 && rand.nextInt(GenRates.LARGE_PALM_CHANCE) == 0) {
        i = chunkPos.getX() + 16;
        k = chunkPos.getZ() + 16;
        new WorldGenLargePalmTrees(world, rand).generate(world, rand, new BlockPos(i, this.getTerrainHeightAt(world, i, k), k));
    }
    if (rand.nextInt(TREASURE_CHANCE) == 0) {
        i = chunkPos.getX() + 13 + rand.nextInt(5);
        k = chunkPos.getZ() + 13 + rand.nextInt(5);
        new WorldGenTropicsTreasure(world, rand).generate(world, rand, new BlockPos(i, getTerrainHeightAt(world, i, k), k));
    }
    decorateForVillage(world, rand, chunkPos);
}
Also used : WorldGenLargePalmTrees(net.tropicraft.core.common.worldgen.WorldGenLargePalmTrees) WorldGenTropicsTreasure(net.tropicraft.core.common.worldgen.WorldGenTropicsTreasure) BlockPos(net.minecraft.util.math.BlockPos) WorldGenCurvedPalms(net.tropicraft.core.common.worldgen.WorldGenCurvedPalms) WorldGenNormalPalms(net.tropicraft.core.common.worldgen.WorldGenNormalPalms)

Example 2 with WorldGenTropicsTreasure

use of net.tropicraft.core.common.worldgen.WorldGenTropicsTreasure in project Tropicraft by Tropicraft.

the class BiomeDecoratorTropicsOcean method genDecorations.

@Override
public void genDecorations(Biome biome, World world, Random rand) {
    super.genDecorations(biome, world, rand);
    coralGen.generate(world, rand, chunkPos);
    coralReefGen.generate(world, rand, chunkPos);
    seaweedGen.generate(world, rand, chunkPos);
    manganeseGen.generate(world, rand, chunkPos);
    shakaGen.generate(world, rand, chunkPos);
    if (GenRates.SHIPWRECK_CHANCE != 0 && rand.nextInt(GenRates.SHIPWRECK_CHANCE) == 0) {
        int i = randDecorationCoord(rand, chunkPos.getX(), 16);
        int k = randDecorationCoord(rand, chunkPos.getZ(), 16);
        new WorldGenSunkenShip(world, rand).generate(new BlockPos(i, getTerrainHeightAt(world, i, k), k));
    }
    if (rand.nextInt(TREASURE_CHANCE) == 0) {
        int i = randDecorationCoord(rand, chunkPos.getX(), 12);
        int k = randDecorationCoord(rand, chunkPos.getZ(), 12);
        new WorldGenTropicsTreasure(world, rand).generate(world, rand, new BlockPos(i, getTerrainHeightAt(world, i, k), k));
    }
}
Also used : WorldGenSunkenShip(net.tropicraft.core.common.worldgen.WorldGenSunkenShip) WorldGenTropicsTreasure(net.tropicraft.core.common.worldgen.WorldGenTropicsTreasure) BlockPos(net.minecraft.util.math.BlockPos)

Aggregations

BlockPos (net.minecraft.util.math.BlockPos)2 WorldGenTropicsTreasure (net.tropicraft.core.common.worldgen.WorldGenTropicsTreasure)2 WorldGenCurvedPalms (net.tropicraft.core.common.worldgen.WorldGenCurvedPalms)1 WorldGenLargePalmTrees (net.tropicraft.core.common.worldgen.WorldGenLargePalmTrees)1 WorldGenNormalPalms (net.tropicraft.core.common.worldgen.WorldGenNormalPalms)1 WorldGenSunkenShip (net.tropicraft.core.common.worldgen.WorldGenSunkenShip)1