Package net.minecraft.world.biome

Examples of net.minecraft.world.biome.BiomeGenBase


    public Block getNullOverride(World world, int x, int z) {
        if (world == null)
            return Blocks.stone;

        BiomeGenBase biome = world.getBiomeGenForCoords(x, z);
        if (biome == BiomeGenBase.hell)
            return Blocks.netherrack;

        if (biome == BiomeGenBase.sky)
            return Blocks.end_stone;
View Full Code Here


  @Override
  public boolean canSpawn(World world, double x, double y, double z) {
    if(!canFly(world))
      return false;

    BiomeGenBase biome = Utils.getBiomeAt(world, (int)x, (int)z);
    if(getGenome().getPrimary().getSpawnBiomes().size() > 0) {
      boolean noneMatched = true;

      if(getGenome().getPrimary().strictSpawnMatch()) {
        BiomeDictionary.Type[] types = BiomeDictionary.getTypesForBiome(biome);
View Full Code Here

        int divider = 0;
        for (int x = -distance; x <= distance; ++x)
        {
            for (int z = -distance; z <= distance; ++z)
            {
                BiomeGenBase biome = world.getBiomeGenForCoords(playerX + x, playerZ + z);
                int colour = biome.getSkyColorByTemp(biome.getFloatTemperature(playerX + x, playerY, playerZ + z));
                r += (colour & 0xFF0000) >> 16;
                g += (colour & 0x00FF00) >> 8;
                b += colour & 0x0000FF;
                divider++;
            }
View Full Code Here

    excludedBiomes.add(BiomeGenBase.frozenOcean.biomeID);
    excludedBiomes.add(BiomeGenBase.beach.biomeID);
    biomesToSearch.removeAll(excludedBiomes);

    // If we are in a valid biome, we point to ourself.
    BiomeGenBase biome = world.getBiomeGenForCoords((int) player.posX, (int) player.posZ);
    if (biomesToSearch.contains(biome.biomeID)) {
      Proxies.common.setBiomefinderCoordinates(player, new ChunkCoordinates((int) player.posX, (int) player.posY, (int) player.posZ));
      return;
    }
View Full Code Here

    return coordinates;
  }

  private ChunkCoordinates getChunkCoordinates(Vect pos, World world, ArrayList<Integer> biomesToSearch, boolean loadChunks) {

    BiomeGenBase biome = world.getBiomeGenForCoords(pos.x, pos.z);

    if (biomesToSearch.contains(biome.biomeID))
      return new ChunkCoordinates(pos.x, pos.y, pos.z);

    return null;
View Full Code Here

public class JubilanceDefault implements IJubilanceProvider {

  @Override
  public boolean isJubilant(IAlleleBeeSpecies species, IBeeGenome genome, IBeeHousing housing) {
    BiomeGenBase biome = BiomeGenBase.getBiome(housing.getBiomeId());

    if (EnumTemperature.getFromValue(biome.temperature) != species.getTemperature() ||
        EnumHumidity.getFromValue(biome.rainfall) != species.getHumidity())
      return false;
View Full Code Here

    // Skip if we are restricted by biomes and this one does not match.
    if (restrictBiomeTypes.size() > 0) {
      boolean noneMatched = true;

      BiomeGenBase biome = BiomeGenBase.getBiome(housing.getBiomeId());
      if(strictBiomeCheck) {
        BiomeDictionary.Type[] types = BiomeDictionary.getTypesForBiome(biome);
        if(types.length == 1 && restrictBiomeTypes.contains(types[0]))
          noneMatched = false;
      } else {
        for(BiomeDictionary.Type type : restrictBiomeTypes) {
          if(BiomeDictionary.isBiomeOfType(biome, type)) {
            noneMatched = false;
            break;
          }
        }
      }

      if (noneMatched)
        return 0;
    }

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

    }

  }

  private void setBiomeInformation() {
    BiomeGenBase biome = worldObj.getBiomeGenForCoords(xCoord, zCoord);
    this.biomeId = biome.biomeID;
    this.temperature = biome.temperature;
    this.humidity = biome.rainfall;
    setErrorState(EnumErrorCode.OK);
  }
View Full Code Here

  }

  private IBee getVillageBee(World world, int xCoord, int yCoord, int zCoord) {

    // Get current biome
    BiomeGenBase biome = world.getBiomeGenForCoords(xCoord, zCoord);

    ArrayList<IBeeGenome> candidates;
    if (BeeManager.villageBees[1] != null && BeeManager.villageBees[1].size() > 0 && world.rand.nextDouble() < 0.2)
      candidates = BeeManager.villageBees[1];
    else
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;

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.