Package net.minecraft.world.biome

Examples of net.minecraft.world.biome.BiomeGenBase


        return;
    }
  }

  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;
View Full Code Here


      return false;

    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

     */
    public static void registerAllBiomesAndGenerateEvents()
    {
        for(int i = 0; i < BiomeGenBase.getBiomeGenArray().length; i++)
        {
            BiomeGenBase biome = BiomeGenBase.getBiomeGenArray()[i];

            if(biome == null)
            {
                continue;
            }
View Full Code Here

 
  @Override
  public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
    float processedChance = chance;

    BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(x, z);
    if (biome.temperature < minTemperature || biome.temperature > maxTemperature)
      return 0;
    if (biome.rainfall < minRainfall || biome.rainfall > maxRainfall)
      return 0;
View Full Code Here

    return new String[0];
  }

  protected EnumGrowthConditions getConditionsFromRainfall(World world, int xPos, int yPos, int zPos, float min, float max) {

    BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(xPos, zPos);
    if (biome.rainfall < min || biome.rainfall > max)
      return EnumGrowthConditions.HOSTILE;

    return EnumGrowthConditions.EXCELLENT;
  }
View Full Code Here

    return EnumGrowthConditions.EXCELLENT;
  }

  protected EnumGrowthConditions getConditionsFromTemperature(World world, int xPos, int yPos, int zPos, float min, float max) {

    BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(xPos, zPos);
    if (biome.temperature < min || biome.temperature > max)
      return EnumGrowthConditions.HOSTILE;

    return EnumGrowthConditions.EXCELLENT;
  }
View Full Code Here

  @Override
  public void validate() {
    // Raintanks in desert and snow biomes are useless
    if (worldObj != null) {
      BiomeGenBase biome = Utils.getBiomeAt(worldObj, xCoord, zCoord);
      if (EnumHumidity.getFromValue(biome.rainfall) == EnumHumidity.ARID) {
        setErrorState(EnumErrorCode.INVALIDBIOME);
        isValidBiome = false;
      }
    }
View Full Code Here

        return EnumErrorCode.NOTGLOOMY.ordinal();
    } else if(!canWorkAtNight() && !housing.isSelfLighted())
      return EnumErrorCode.NOTLUCID.ordinal();

    // / No sky, except if in hell
    BiomeGenBase biome = BiomeGenBase.getBiome(housing.getBiomeId());
    if(biome == null)
      return EnumErrorCode.NOSKY.ordinal();
    if (!BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.NETHER) && !world.canBlockSeeTheSky(housing.getXCoord(), housing.getYCoord() + 3, housing.getZCoord())
        && !genome.getCaveDwelling() && !housing.isSunlightSimulated())
      return EnumErrorCode.NOSKY.ordinal();
View Full Code Here

  private IEffectData effectData[] = new IEffectData[2];

  private void updateBiome() {
    if(worldObj == null)
      return;
    BiomeGenBase biome = Utils.getBiomeAt(worldObj, xCoord, zCoord);
    if (biome != null) {
      this.biomeId = biome.biomeID;
    }
  }
View Full Code Here

  /* UPDATING */
  @Override
  public void initialize() {
    super.initialize();
    BiomeGenBase biome = worldObj.getBiomeGenForCoordsBody(xCoord, zCoord);
    this.biomeId = biome.biomeID;
    this.temperature = biome.temperature;
    this.humidity = biome.rainfall;
    setErrorState(EnumErrorCode.OK);
  }
View Full Code Here

TOP

Related Classes of net.minecraft.world.biome.BiomeGenBase

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.