content: package zmaster587.advancedRocketry.world.biome;
  
  import net.minecraft.block.BlockFlower.EnumFlowerType;
  import net.minecraft.block.material.Material;
  import net.minecraft.entity.monster.EntitySlime;
  import net.minecraft.init.Blocks;
  import net.minecraft.util.math.BlockPos;
  import net.minecraft.world.World;
  import net.minecraft.world.biome.Biome;
  import net.minecraft.world.chunk.ChunkPrimer;
  import net.minecraft.world.gen.feature.WorldGenAbstractTree;
  import net.minecraftforge.fml.relauncher.Side;
  import net.minecraftforge.fml.relauncher.SideOnly;
  import zmaster587.advancedRocketry.world.gen.WorldGenNoTree;
  
  import javax.annotation.Nonnull;
  import java.util.Random;
  
  public class BiomeGenDeepSwamp extends Biome {
  
  	private final static WorldGenNoTree noTree = new WorldGenNoTree(false);
  	
  	public BiomeGenDeepSwamp(BiomeProperties properties) {
  		super(properties);
  		
  		this.decorator.treesPerChunk = 10;
          this.decorator.flowersPerChunk = 1;
          this.decorator.deadBushPerChunk = 1;
          this.decorator.mushroomsPerChunk = 8;
          this.decorator.reedsPerChunk = 10;
          this.decorator.clayPerChunk = 1;
          this.decorator.waterlilyPerChunk = 4;
          this.decorator.sandPatchesPerChunk = 0;
          this.decorator.grassPerChunk = 5;
          this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySlime.class, 1, 1, 1));
          this.flowers.clear();
          this.addFlower(Blocks.RED_FLOWER.getDefaultState(), 10);
  	}
  	
  	@Override
  	@SideOnly(Side.CLIENT)
  	public int getSkyColorByTemp(float p_76731_1_) {
  		return 0x203020;
  	}
  	
  	@Override
      @Nonnull
  	public WorldGenAbstractTree getRandomTreeFeature(Random rand) {
  		return SWAMP_FEATURE;
  	}
  	
  	@Override
      @Nonnull
  	public EnumFlowerType pickRandomFlower(Random rand, BlockPos pos) {
  		return EnumFlowerType.BLUE_ORCHID;
  	}
  	
  	@Override
  	public void genTerrainBlocks(World worldIn, Random rand,
  			@Nonnull ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal) {
  		
  		double d0 = GRASS_COLOR_NOISE.getValue((double)x * 0.25D, (double)z * 0.25D);
  
          if (d0 > 0.0D) {
              int i = x & 15;
              int j = z & 15;
  
              for (int k = 255; k >= 0; --k) {
                  if (chunkPrimerIn.getBlockState(j, k, i).getMaterial() != Material.AIR) {
                      if (k == 62 && chunkPrimerIn.getBlockState(j, k, i).getBlock() != Blocks.WATER) {
                          chunkPrimerIn.setBlockState(j, k, i, WATER);
  
                          if (d0 < 0.12D) {
                              chunkPrimerIn.setBlockState(j, k + 1, i, Blocks.WATERLILY.getDefaultState());
                          }
                      }
  
                      break;
                  }
              }
          }
  
          this.generateBiomeTerrain(worldIn, rand, chunkPrimerIn, x, z, noiseVal);
  	}
  	
      /**
       * Provides the basic grass color based on the biome temperature and rainfall
       */
      @SideOnly(Side.CLIENT)
      public int getBiomeGrassColor(int x, int y, int z) {
      	
      	double d0 = GRASS_COLOR_NOISE.getValue((double)x * 0.25D, (double)z * 0.25D);
          return d0 < -0.1D ? 5011004 : 6975545;
      }
  
      /**
       * Provides the basic foliage color based on the biome temperature and rainfall
       */
      @SideOnly(Side.CLIENT)
      public int getBiomeFoliageColor(int p_150571_1_, int p_150571_2_, int p_150571_3_) {
          return 6975545;
      }
  }
  