Examples of BiomeGenBase


Examples of net.minecraft.world.biome.BiomeGenBase

        {
            if (arrayOfInt[i3] >= DefaultBiome.values().length)
                continue;
            int i4 = i + i3 % n << 2;
            int i5 = j + i3 / n << 2;
            BiomeGenBase localBiomeBase = BiomeGenBase.getBiome(arrayOfInt[i3]);
            if ((!paramList.contains(localBiomeBase)) || ((localChunkPosition != null) && (paramRandom.nextInt(i2 + 1) != 0)))
                continue;
            localChunkPosition = new ChunkPosition(i4, 0, i5);
            i2++;
        }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

        var5 += random.nextInt(this.maxDistanceBetweenScatteredFeatures - this.minDistanceBetweenScatteredFeatures);
        var6 += random.nextInt(this.maxDistanceBetweenScatteredFeatures - this.minDistanceBetweenScatteredFeatures);

        if (var3 == var5 && var4 == var6)
        {
            BiomeGenBase biomeAtPosition = this.worldObj.getWorldChunkManager().getBiomeGenAt(var3 * 16 + 8, var4 * 16 + 8);

            for (BiomeGenBase biome : biomeList)
            {
                if (biomeAtPosition.biomeID == biome.biomeID)
                {
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

     * @return The registered biome.
     */
    public static ForgeBiome createBiome(BiomeConfig biomeConfig, BiomeIds biomeIds)
    {
        // Store the previous biome in a variable
        BiomeGenBase previousBiome = BiomeGenBase.getBiome(biomeIds.getSavedId());

        // Register new biome
        ForgeBiome biome = new ForgeBiome(biomeConfig, new BiomeGenCustom(biomeConfig.getName(), biomeIds));

        // Restore settings of the previous biome
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

        // Save all original vanilla biomes, so that they can be restored
        // later on
        for (DefaultBiome defaultBiome : DefaultBiome.values())
        {
            int biomeId = defaultBiome.Id;
            BiomeGenBase oldBiome = BiomeGenBase.getBiome(biomeId);
            biomesToRestore[biomeId] = oldBiome;
            nextBiomeId++;
        }
    }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

        EventHandlerGC.doPopulate(event.world, event.rand, worldX + event.rand.nextInt(16), worldZ + event.rand.nextInt(16));
    }

    public static void doPopulate(World world, Random rand, int x, int z)
    {
        final BiomeGenBase biomegenbase = world.getBiomeGenForCoords(x + 16, z + 16);

        if (biomegenbase.biomeID == BiomeGenBase.sky.biomeID || biomegenbase.biomeID == BiomeGenBase.hell.biomeID)
        {
            return;
        }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

        int y1 = (int) MathHelper.clip(entity.posY, 16, world.getHeight() - 16);

        for (int x = x1 - 16; x <= x1 + 16; x++)
            for (int z = z1 - 16; z <= z1 + 16; z++) {
                Chunk chunk = world.getChunkFromBlockCoords(x, z);
                BiomeGenBase biome = world.getBiomeGenForCoords(x, z);
                if (biome.getSpawnableList(EnumCreatureType.monster).isEmpty() || biome.getSpawningChance() <= 0)
                    continue;

                for (int y = y1 - 16; y < y1 + 16; y++) {
                    int spawnMode = getSpawnMode(chunk, x, y, z);
                    if (spawnMode == 0)
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

    public void generate (Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
    {
        //Overworld
        int xCh, yCh, zCh;
        int xChunk = chunkX * 16 + 8, zChunk = chunkZ * 16 + 8;
        BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(xChunk + 16, zChunk + 16);

        if (PHNatura.generateOverworldClouds && biome.rainfall > 0.15f && random.nextInt(PHNatura.cloudSpawnRarity) == 0 && world.provider.dimensionId != 1)
        {
            xCh = xChunk + random.nextInt(16);
            zCh = zChunk + random.nextInt(16);
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

   
    @Override
    public void generate(Random rand, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
        chunkX = chunkX << 4;
        chunkZ = chunkZ << 4;
        final BiomeGenBase biome = world.getBiomeGenForCoords(chunkX, chunkX);
       
        for (int i = 0; i < 20; i++) {
            final int x = chunkX + rand.nextInt(16) + 8;
            final int z = chunkZ + rand.nextInt(16) + 8;
            final int y = world.getHeightValue(x, z);
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

            World world, IChunkProvider chunkGenerator,
            IChunkProvider chunkProvider)
    {
        chunkX = chunkX << 4;
        chunkZ = chunkZ << 4;
        final BiomeGenBase biome = world.getBiomeGenForCoords(chunkX,
                chunkZ);
       
        if (BiomeSettings.GREENSWAMP.getBiome().isPresent() && biome == BiomeSettings.GREENSWAMP.getBiome().get()
                || BiomeSettings.MOUNTAINRIDGE.getBiome().isPresent() && biome == BiomeSettings.MOUNTAINRIDGE.getBiome().get()
                || BiomeSettings.REDWOODLUSH.getBiome().isPresent() && biome == BiomeSettings.REDWOODLUSH.getBiome().get()
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

            World world, IChunkProvider chunkGenerator,
            IChunkProvider chunkProvider)
    {
        chunkX = chunkX << 4;
        chunkZ = chunkZ << 4;
        final BiomeGenBase biome = world.getBiomeGenForCoords(chunkX,
                chunkZ);
       
        if (BiomeSettings.MOUNTAINRIDGE.getBiome().isPresent() && biome == BiomeSettings.MOUNTAINRIDGE.getBiome().get())
        {
            trimPondsInGrass(random, chunkX, chunkZ, world);
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.