Examples of BiomeGenBase


Examples of net.minecraft.world.biome.BiomeGenBase

      for (z = 0; z < width; ++z) {
        for (y = 0; y < height; ++y) {
          if (spawnBlock[(x * width + z) * height + y] &&
              world.getBlock(xStart + x, yStart + y - 1, zStart + z).equals(Blocks.dirt)
              && world.getSavedLightValue(EnumSkyBlock.Sky, xStart + x, yStart + y, zStart + z) > 0) {
            BiomeGenBase bgb = world.getBiomeGenForCoords(xStart + x, zStart + z);
            if (lineWithFiller)
              world.setBlock(xStart + x, yStart + y - 1, zStart + z, bgb.fillerBlock, 0, 2);
            else
              world.setBlock(xStart + x, yStart + y - 1, zStart + z, bgb.topBlock, bgb.field_150604_aj, 2);
          }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

        for (int k1 = -1; k1 <= 1; ++k1)
        {
            for (int l1 = -1; l1 <= 1; ++l1)
            {
                BiomeGenBase biome = world.getBiomeGenForCoords(x + l1, z + k1);
                int grassColor = 0;
                if (meta == 1)
                {
                    double temp = MathHelper.clamp_float(biome.getFloatTemperature(x, y, z), 0.0F, 1.0F);
                    double rainfall = MathHelper.clamp_float(biome.getFloatRainfall(), 0.0F, 1.0F);
                    grassColor = GrassColorizerAlternate.getBlueGrassColor(temp, rainfall);
                }
                else if (meta == 2)
                {
                    double temp = MathHelper.clamp_float(biome.getFloatTemperature(x, y, z), 0.0F, 1.0F);
                    double rainfall = MathHelper.clamp_float(biome.getFloatRainfall(), 0.0F, 1.0F);
                    grassColor = GrassColorizerAlternate.getOrangeGrassColor(temp, rainfall);
                }
                else
                {
                    grassColor = biome.getBiomeGrassColor(x, y, z);
                }
                l += (grassColor & 16711680) >> 16;
                i1 += (grassColor & 65280) >> 8;
                j1 += grassColor & 255;
            }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

        for (int k1 = -1; k1 <= 1; ++k1)
        {
            for (int l1 = -1; l1 <= 1; ++l1)
            {
                BiomeGenBase biome = world.getBiomeGenForCoords(x + l1, z + k1);
                int grassColor = 0;
                if (meta == 1)
                {
                    double temp = MathHelper.clamp_float(biome.getFloatTemperature(x, y, z), 0.0F, 1.0F);
                    double rainfall = MathHelper.clamp_float(biome.getFloatRainfall(), 0.0F, 1.0F);
                    grassColor = GrassColorizerAlternate.getBlueGrassColor(temp, rainfall);
                }
                else if (meta == 2)
                {
                    double temp = MathHelper.clamp_float(biome.getFloatTemperature(x, y, z), 0.0F, 1.0F);
                    double rainfall = MathHelper.clamp_float(biome.getFloatRainfall(), 0.0F, 1.0F);
                    grassColor = GrassColorizerAlternate.getOrangeGrassColor(temp, rainfall);
                }
                else
                {
                    grassColor = biome.getBiomeGrassColor(x, y, z);
                }
                l += (grassColor & 16711680) >> 16;
                i1 += (grassColor & 65280) >> 8;
                j1 += grassColor & 255;
            }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

        final int xChunk = chunkX * 16 + 8, zChunk = chunkZ * 16 + 8;
        int xCh = chunkX * 16 + random.nextInt(16);
        int yCh = random.nextInt(128);
        int zCh = chunkZ * 16 + random.nextInt(16);

        BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(chunkX * 16, chunkZ * 16);

        //Barley
        if (PHNatura.generateBarley && random.nextInt(5) == 0 && goodClimate(biome, 0.11f, 1.0f, 0.11f, 2f))
        {
            generateBarley(world, random, xCh, yCh + PHNatura.seaLevel, zCh);
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

        {
            return this.genNetherBridge.getSpawnList();
        }
        else
        {
            BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(par2, par4);
            return biomegenbase == null ? null : biomegenbase.getSpawnableList(par1EnumCreatureType);
        }
    }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

  {
    MFRLiquidMover.pumpLiquid(_tank, this);
   
    if(worldObj.getWorldInfo().isRaining() && canSeeSky())
    {
      BiomeGenBase bgb = worldObj.getBiomeGenForCoords(this.xCoord, this.zCoord);
     
      if(!bgb.canSpawnLightningBolt() && !bgb.getEnableSnow())
      {
        setIdleTicks(getIdleTicksMax());
        return false;
      }
      setWorkDone(getWorkDone() + 1);
      if(getWorkDone() >= getWorkMax())
      {
        if(bgb.getFloatTemperature() >= 0.15F)
        {
          if(_tank.fill(new LiquidStack(Block.waterStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME), true) > 0)
          {
            setWorkDone(0);
            return true;
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

    }
   
    int x = chunkX * 16 + random.nextInt(16);
    int z = chunkZ * 16 + random.nextInt(16);
   
    BiomeGenBase b = world.getBiomeGenForCoords(x, z);
   
    if(MFRConfig.rubberTreeWorldGen.getBoolean(true))
    {
      if(MFRRegistry.getRubberTreeBiomes().contains(b.biomeName))
      {
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

          for(i2 = 4; i2 < 8; ++i2)
          {
            if(aboolean[(i1 * 16 + j2) * 8 + i2] && world.getBlockId(x + i1, y + i2 - 1, z + j2) == Block.dirt.blockID
                && world.getSavedLightValue(EnumSkyBlock.Sky, x + i1, y + i2, z + j2) > 0)
            {
              BiomeGenBase biomegenbase = world.getBiomeGenForCoords(x + i1, z + j2);
             
              if(biomegenbase.topBlock == Block.mycelium.blockID)
              {
                world.setBlock(x + i1, y + i2 - 1, z + j2, Block.mycelium.blockID, 0, 2);
              }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

    }

    @Override
    public List<?> getPossibleCreatures(EnumCreatureType paramaca, int paramInt1, int paramInt2, int paramInt3)
    {
        BiomeGenBase Biome = this.worldHandle.getBiomeGenForCoords(paramInt1, paramInt3);
        if (Biome == null)
        {
            return null;
        }
        return Biome.getSpawnableList(paramaca);
    }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

        int n = k - i + 1;
        int i1 = m - j + 1;
        BiomeGenBase[] arrayOfInt = this.getBiomesForGeneration(null, i, j, n, i1);
        for (int i2 = 0; i2 < n * i1; i2++)
        {
            BiomeGenBase localBiomeBase = arrayOfInt[i2];
            if (!paramList.contains(localBiomeBase))
                return false;
        }

        return true;
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.