Examples of LocalBiome


Examples of com.khorn.terraincontrol.LocalBiome

        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

Examples of com.khorn.terraincontrol.LocalBiome

        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);
        }
       
        this.a.add(startPiece);
        startPiece.a(startPiece, this.a, random);
        List<StructurePiece> arraylist1 = startPiece.j;
View Full Code Here

Examples of com.khorn.terraincontrol.LocalBiome

            {
                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

Examples of com.khorn.terraincontrol.LocalBiome

    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

Examples of com.khorn.terraincontrol.LocalBiome

        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

Examples of com.khorn.terraincontrol.LocalBiome

            {
                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

Examples of com.khorn.terraincontrol.LocalBiome

        {
            sender.sendMessage(ERROR_COLOR + "Plugin is not enabled for this world.");
            return true;
        }

        LocalBiome biome = world.getBiome(x, z);
        BiomeIds biomeIds = biome.getIds();

        sender.sendMessage(MESSAGE_COLOR + "According to the biome generator, you are in the " + VALUE_COLOR + biome.getName() + MESSAGE_COLOR + " biome, with id " + VALUE_COLOR
                + biomeIds.getGenerationId());

        if (args.contains("-f"))
        {
            sender.sendMessage(MESSAGE_COLOR + "The base temperature of this biome is " + VALUE_COLOR + biome.getBiomeConfig().biomeTemperature + MESSAGE_COLOR + ", \nat your height it is " + VALUE_COLOR
                    + biome.getTemperatureAt(x, y, z));
        }

        if (args.contains("-s"))
        {
            try
            {
                LocalBiome savedBiome = world.getSavedBiome(x, z);
                BiomeIds savedIds = savedBiome.getIds();
                sender.sendMessage(MESSAGE_COLOR + "According to the world save files, you are in the " + VALUE_COLOR
                        + savedBiome.getName() + MESSAGE_COLOR + " biome, with id " + VALUE_COLOR
                        + savedIds.getSavedId());
            } catch (BiomeNotFoundException e)
            {
                sender.sendMessage(ERROR_COLOR + "An unknown biome (" + e.getBiomeName() + ") was saved to the save files here.");
            }
View Full Code Here

Examples of com.khorn.terraincontrol.LocalBiome

            biomeReader.putSetting(BiomeStandardValues.FOLIAGE_COLOR_IS_MULTIPLIER, stream.readBoolean());

            BiomeLoadInstruction instruction = new BiomeLoadInstruction(biomeName, id, defaultSettings);
            BiomeConfig config = new BiomeConfig(biomeReader, instruction, worldConfig);
            config.process();
            LocalBiome biome = world.createBiomeFor(config, new BiomeIds(id));

            biomes[id] = biome;
            biome.setEffects();
        }

        savedBiomes.addAll(Arrays.asList(biomes));
    }
View Full Code Here

Examples of com.khorn.terraincontrol.LocalBiome

        // Fetch all non-virtual custom biomes
        Collection<LocalBiome> nonVirtualCustomBiomes = new ArrayList<LocalBiome>(worldConfig.customBiomeGenerationIds.size());
        for (Integer generationId : worldConfig.customBiomeGenerationIds.values())
        {
            LocalBiome biome = biomes[generationId];
            if (!biome.getIds().isVirtual()) {
                nonVirtualCustomBiomes.add(biome);
            }
        }

        // Write them to the stream
        stream.writeInt(nonVirtualCustomBiomes.size());
        for (LocalBiome biome : nonVirtualCustomBiomes)
        {
            ConfigFile.writeStringToStream(stream, biome.getName());
            stream.writeInt(biome.getIds().getSavedId());
        }

        // BiomeConfigs
        stream.writeInt(savedBiomes.size());
        for (LocalBiome biome : savedBiomes)
        {
            if (biome == null)
            {
                continue;
            }
            stream.writeInt(biome.getIds().getSavedId());
            biome.getBiomeConfig().writeToStream(stream);
        }
    }
View Full Code Here

Examples of com.khorn.terraincontrol.LocalBiome

            return;
        }

        Location location = event.getLocation();

        LocalBiome biome;
        try
        {
            biome = world.getSavedBiome(location.getBlockX(), location.getBlockZ());
        } catch (BiomeNotFoundException e)
        {
            return;
        }

        BiomeConfig biomeConfig = biome.getBiomeConfig();

        // Get sapling type
        SaplingType saplingType = toSaplingType(event.getSpecies());
        if (saplingType == null)
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.