Examples of BiomeGenBase


Examples of net.minecraft.src.BiomeGenBase

    static String getBiomeNameAt(int i, int j, int k) {
        if (instance == null) {
            return null;
        } else {
            BiomeGenBase biome = instance.getBiomeGenAt(i, j, k);
            return biome == null ? null : biome.biomeName;
        }
    }
View Full Code Here

Examples of net.minecraft.src.BiomeGenBase

      return false;
   }

   @Override
   public BiomeType getBiome(Vector2D arg0) {
      BiomeGenBase biome = this.world.getMinecraftWorld().getBiomeGenForCoords(arg0.getBlockX(), arg0.getBlockZ()); // world.getWorldChunkManager().getBiomeGenAt
      try {
         return MinecraftBiomeType.valueOf(biome.biomeName.toUpperCase(java.util.Locale.ENGLISH)); // name
      } catch(IllegalArgumentException e) {
         // e.printStackTrace();
         return BiomeType.UNKNOWN;
View Full Code Here

Examples of net.minecraft.src.BiomeGenBase

    if (!biomesLogged) {
      biomesLogged = true;
      Iterator i$ = biomes.iterator();

      while (i$.hasNext()) {
        BiomeGenBase biome = (BiomeGenBase)i$.next();
        int x = ColorMap.getX((double)biome.temperature, (double)biome.rainfall);
        int y = ColorMap.getY((double)biome.temperature, (double)biome.rainfall);
        logger.finer("setupBiome #%d \"%s\" %06x (%d,%d)", new Object[] {Integer.valueOf(biome.biomeID), biome.biomeName, Integer.valueOf(biome.waterColorMultiplier), Integer.valueOf(x), Integer.valueOf(y)});
      }
    }
View Full Code Here

Examples of net.minecraft.src.BiomeGenBase

        if (!s.isEmpty()) {
          BiomeGenBase[] arr$1 = BiomeGenBase.biomeList;
          int len$1 = arr$1.length;

          for (int i$1 = 0; i$1 < len$1; ++i$1) {
            BiomeGenBase biome = arr$1[i$1];

            if (biome != null && biome.biomeName != null && s.equals(biome.biomeName.toLowerCase().replace(" ", ""))) {
              bits.set(biome.biomeID);
            }
          }
View Full Code Here

Examples of net.minecraft.src.BiomeGenBase

      }
    }
  }

  static int getBiomeIDAt(int i, int j, int k) {
    BiomeGenBase biome = getBiomeGenAt(i, j, k);
    return biome == null ? BiomeGenBase.biomeList.length : biome.biomeID;
  }
View Full Code Here

Examples of net.minecraft.src.BiomeGenBase

  static float getRainfall(int i, int j, int k) {
    return getBiomeGenAt(i, j, k).getFloatRainfall();
  }

  static int getWaterColorMultiplier(int i, int j, int k) {
    BiomeGenBase biome = getBiomeGenAt(i, j, k);

    if (getWaterColorMultiplier != null) {
      try {
        return ((Integer)getWaterColorMultiplier.invoke(biome, new Object[0])).intValue();
      } catch (Throwable var5) {
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

   * Populates chunk with ores etc etc
   */
  public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
    int k = par2 * 16;
    int l = par3 * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long i1 = this.random.nextLong() / 2L * 2L + 1L;
    long j1 = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

  /**
   * Returns a list of creatures of the specified type that can spawn at the given location.
   */
  public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) {
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(par2, par4);
    return biomegenbase == null ? null : biomegenbase.getSpawnableList(par1EnumCreatureType);
  }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

  protected abstract boolean generateFeature(Random random, int chunkX, int chunkZ, World world);

  protected boolean canGenerateInBiome(World world, int x, int z, Random rand) {

    if (biomeRestriction != GenRestriction.NONE) {
      BiomeGenBase biome = world.getBiomeGenForCoords(x, z);
      return !(biomeRestriction == GenRestriction.BLACKLIST == biomes.contains(biome, rand));
    }
    return true;
  }
View Full Code Here

Examples of net.minecraft.world.biome.BiomeGenBase

  @Override
  public boolean contains(Object o) {
    BiomeInfo[] oldData = elementData;
    if (o instanceof BiomeGenBase) {
      BiomeGenBase bgb = (BiomeGenBase)o;
      for (int i = 0, e = size; i < e; ++i)
        if (oldData[i] != null && oldData[i].isBiomeEqual(bgb, null))
          return true;
      return false;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.