Package forestry.api.core

Examples of forestry.api.core.EnumTemperature


    World world = housing.getWorld();

    if (isHalted(storedData, housing))
      return storedData;

    EnumTemperature temp = EnumTemperature.getFromValue(BiomeGenBase.getBiome(housing.getBiomeId()).temperature);

    switch (temp) {
    case HELLISH:
    case HOT:
    case WARM:
View Full Code Here


    return PluginApiculture.beeInterface.getBee(world, valid.get(world.rand.nextInt(valid.size())));
  }

  private boolean checkBiomeHazard(IBeeGenome genome, float temperature, float humidity) {

    EnumTemperature beeTemperature = genome.getPrimary().getTemperature();
    EnumTolerance temperatureTolerance = genome.getToleranceTemp();

    Collection<EnumTemperature> toleratedTemperatures = AlleleManager.climateHelper.getToleratedTemperature(beeTemperature, temperatureTolerance);
    boolean validTemp = false;
View Full Code Here

    if (!hive.canReplace(world, x, y, z))
      return false;

    BiomeGenBase biome = world.getBiomeGenForCoords(x, z);
    EnumTemperature temperature = EnumTemperature.getFromValue(biome.getFloatTemperature(x, y, z));
    if (!hive.isGoodTemperature(temperature))
      return false;

    if (!hive.isGoodLocation(world, x, y, z))
      return false;
View Full Code Here

  }

  @Override
  public void draw(int x, int y) {

    EnumTemperature temperature = tile.getTemperature();

    // Draw background
    drawBackground(x, y);

    // Draw icon
    drawIcon(temperature.getIcon(), x + 3, y + 4);

    if (!isFullyOpened())
      return;

    manager.minecraft.fontRenderer.drawStringWithShadow(StringUtil.localize("gui.climate"), x + 22, y + 8,
View Full Code Here

    return !genome.getPrimary().isNocturnal() || genome.getNocturnal();
  }

  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 setTemperature(float minTemperature, float maxTemperature) {
    this.minTemperature = minTemperature;
    this.maxTemperature = maxTemperature;
   
    EnumTemperature temp1 = EnumTemperature.getFromValue(minTemperature);
    EnumTemperature temp2 = EnumTemperature.getFromValue(maxTemperature);
    if(temp1 != temp2)
      specialConditions.add(String.format("Temperature between %s and %s.", temp1, temp2));
    else
      specialConditions.add(String.format("Temperature %s required.", temp1));
    return this;
View Full Code Here

    World world = housing.getWorld();

    if (isHalted(storedData, housing))
      return storedData;

    EnumTemperature temp = EnumTemperature.getFromValue(BiomeGenBase.getBiome(housing.getBiomeId()).temperature);

    switch (temp) {
    case HELLISH:
    case HOT:
    case WARM:
View Full Code Here

TOP

Related Classes of forestry.api.core.EnumTemperature

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.