Package com.khorn.terraincontrol

Examples of com.khorn.terraincontrol.LocalWorld


    {
        Random rand = b;
        World worldMC = c;
        if (rand.nextInt(80) < Math.max(Math.abs(chunkX), Math.abs(chunkZ)))
        {
            LocalWorld world = WorldHelper.toLocalWorld(worldMC);
            LocalBiome biome = world.getBiome(chunkX * 16 + 8, chunkZ * 16 + 8);
            if (rand.nextDouble() * 100.0 < biome.getBiomeConfig().mineshaftsRarity)
            {
                return true;
            }
        }
View Full Code Here


        int startX = (chunkX << 4) + 2;
        int startZ = (chunkZ << 4) + 2;
        WorldGenVillageStartPiece startPiece = new WorldGenVillageStartPiece(world.getWorldChunkManager(), 0, random, startX, startZ, villagePieces, size);

        // Apply the villageType setting
        LocalWorld worldTC = WorldHelper.toLocalWorld(world);
        LocalBiome biome = worldTC.getBiome(startX, startZ);
        if (biome != null)
        {
            // Ignore removed custom biomes
            changeToSandstoneVillage(startPiece, biome.getBiomeConfig().villageType == VillageType.sandstone);
        }
View Full Code Here

            if (chunkX != (var3 << 4) + 4 + rand.nextInt(8))
            {
                return false;
            } else
            {
                LocalWorld world = WorldHelper.toLocalWorld(worldObj);
                LocalBiome biome = world.getBiome(chunkX * 16 + 8, chunkZ * 16 + 8);
                if (!biome.getBiomeConfig().netherFortressesEnabled)
                {
                    return false;
                }
                return (chunkZ == (var4 << 4) + 4 + rand.nextInt(8));
View Full Code Here

public class RareBuildingStart extends StructureStart
{
    @SuppressWarnings("unchecked")
    public RareBuildingStart(World world, Random random, int chunkX, int chunkZ)
    {
        LocalWorld localWorld = WorldHelper.toLocalWorld(world);
        BiomeConfig biomeConfig = localWorld.getBiome(chunkX * 16 + 8, chunkZ * 16 + 8).getBiomeConfig();
        StructurePiece building;
        switch (biomeConfig.rareBuildingType)
        {
            case desertPyramid:
                building = new WorldGenPyramidPiece(random, chunkX * 16, chunkZ * 16);
 
View Full Code Here

    @Override
    protected boolean canSpawnStructureAtCoords(int chunkX, int chunkZ)
    {
        if (rand.nextInt(80) < Math.max(Math.abs(chunkX), Math.abs(chunkZ)))
        {
            LocalWorld world = WorldHelper.toLocalWorld(this.worldObj);
            LocalBiome biome = world.getBiome(chunkX * 16 + 8, chunkZ * 16 + 8);
            if (rand.nextDouble() * 100.0 < biome.getBiomeConfig().mineshaftsRarity)
            {
                return true;
            }
        }
View Full Code Here

        int startX = (chunkX << 4) + 2;
        int startZ = (chunkZ << 4) + 2;
        StructureVillagePieces.Start startPiece = new StructureVillagePieces.Start(world.getWorldChunkManager(), 0, random, startX, startZ, villagePieces, size);

        // Apply the villageType setting
        LocalWorld worldTC = WorldHelper.toLocalWorld(world);
        LocalBiome currentBiome = worldTC.getBiome(startX, startZ);
        BiomeConfig config = currentBiome.getBiomeConfig();
        if (config != null)
        {
            // Ignore removed custom biomes
            changeToSandstoneVillage(startPiece, config.villageType == VillageType.sandstone);
View Full Code Here

            if (chunkX != (var3 << 4) + 4 + rand.nextInt(8))
            {
                return false;
            } else
            {
                LocalWorld world = WorldHelper.toLocalWorld(worldObj);
                LocalBiome biome = world.getBiome(chunkX * 16 + 8, chunkZ * 16 + 8);
                if (!biome.getBiomeConfig().netherFortressesEnabled)
                {
                    return false;
                }
                return (chunkZ == (var4 << 4) + 4 + rand.nextInt(8));
View Full Code Here

public class RareBuildingStart extends StructureStart
{
    @SuppressWarnings("unchecked")
    public RareBuildingStart(World world, Random random, int chunkX, int chunkZ)
    {
        LocalWorld localWorld = WorldHelper.toLocalWorld(world);
        BiomeConfig biomeConfig = localWorld.getBiome(chunkX * 16 + 8, chunkZ * 16 + 8).getBiomeConfig();
        StructureComponent building;
        switch (biomeConfig.rareBuildingType)
        {
            case desertPyramid:
                building = new ComponentScatteredFeaturePieces.DesertPyramid(random, chunkX * 16, chunkZ * 16);
 
View Full Code Here

     * @return The colors, indexed by biome id.
     */
    private int[] getColors(World world)
    {
        TerrainControl.log(LogMarker.TRACE, "BukkitWorld::UUID:: {}", world.getDataManager().getUUID());
        LocalWorld bukkitWorld = WorldHelper.toLocalWorld(world);
        if (bukkitWorld == null)
        {
            TerrainControl.log(LogMarker.WARN, "BukkitWorld is null :: Make sure you add `{}` to bukkit.yml", (Object) world.getWorld()
                    .getName());
            return defaultColors;
        }

        LocalBiome[] biomes = bukkitWorld.getConfigs().getBiomeArray();
        int[] colors = new int[biomes.length];
        TerrainControl.log(LogMarker.TRACE, "BukkitWorld settings biomes.length::{}", biomes.length);

        for (LocalBiome biome : biomes)
        {
View Full Code Here

        }

        MapWriter.isWorking = true;
        int height = size;
        int width = size;
        LocalWorld localWorld = WorldHelper.toLocalWorld(world);

        int[] colors = this.getColors(world);

        sender.sendMessage(BaseCommand.MESSAGE_COLOR + "Generating map...");
View Full Code Here

TOP

Related Classes of com.khorn.terraincontrol.LocalWorld

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.