Package forestry.api.core

Examples of forestry.api.core.EnumHumidity


    validTemp = toleratedTemperatures.contains(EnumTemperature.getFromValue(temperature));

    if (!validTemp)
      return false;

    EnumHumidity beeHumidity = genome.getPrimary().getHumidity();
    EnumTolerance humidityTolerance = genome.getToleranceHumid();

    Collection<EnumHumidity> toleratedHumidity = AlleleManager.climateHelper.getToleratedHumidity(beeHumidity, humidityTolerance);

    boolean validHumidity = false;
View Full Code Here


  private void genHive(World world, Random rand, int worldX, int worldZ, IHive hive) {
    if (hive.genChance() < rand.nextFloat() * 128.0f)
      return;

    BiomeGenBase biome = world.getBiomeGenForCoords(worldX, worldZ);
    EnumHumidity humidity = EnumHumidity.getFromValue(biome.rainfall);

    if (!hive.isGoodBiome(biome) || !hive.isGoodHumidity(humidity))
      return;

    for (int tries = 0; tries < 4; tries ++) {
View Full Code Here

    }
  }

  private void genHiveDebug(World world, int worldX, int worldZ, IHive hive) {
    BiomeGenBase biome = world.getBiomeGenForCoords(worldX, worldZ);
    EnumHumidity humidity = EnumHumidity.getFromValue(biome.rainfall);

    if (!hive.isGoodBiome(biome) || !hive.isGoodHumidity(humidity))
      return;

    for (int x = 0; x < 16; x++)
View Full Code Here

  }

  private boolean checkBiomeHazard(BiomeGenBase biome) {

    EnumTemperature temperature = EnumTemperature.getFromValue(biome.temperature);
    EnumHumidity humidity = EnumHumidity.getFromValue(biome.rainfall);
    return AlleleManager.climateHelper.isWithinLimits(temperature, humidity,
        genome.getPrimary().getTemperature(), genome.getToleranceTemp(),
        genome.getPrimary().getHumidity(), genome.getToleranceHumid());
  }
View Full Code Here

  public Mutation setRainfall(float minRainfall, float maxRainfall) {
    this.minRainfall = minRainfall;
    this.maxRainfall = maxRainfall;
   
    EnumHumidity temp1 = EnumHumidity.getFromValue(minRainfall);
    EnumHumidity temp2 = EnumHumidity.getFromValue(maxRainfall);

    if(temp1 != temp2)
      specialConditions.add(String.format("Humidity between %s and %s.", temp1, temp2));
    else
      specialConditions.add(String.format("Humidity %s required.", temp1));
View Full Code Here

TOP

Related Classes of forestry.api.core.EnumHumidity

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.