BiomesOPlenty/common/biomesoplenty/helpers/BiomeCacheBlockBOPhell.java

33 lines
1 KiB
Java
Raw Normal View History

2013-05-18 15:06:30 +00:00
package biomesoplenty.helpers;
import net.minecraft.world.biome.BiomeGenBase;
public class BiomeCacheBlockBOPhell
{
2013-05-31 10:34:02 +00:00
public float[] temperatureValues;
public float[] rainfallValues;
public BiomeGenBase[] biomes;
public int xPosition;
public int zPosition;
public long lastAccessTime;
final BiomeCacheBOPhell theBiomeCache;
2013-05-18 15:06:30 +00:00
2013-05-31 10:34:02 +00:00
public BiomeCacheBlockBOPhell(BiomeCacheBOPhell par1BiomeCache, int par2, int par3)
{
theBiomeCache = par1BiomeCache;
temperatureValues = new float[256];
rainfallValues = new float[256];
biomes = new BiomeGenBase[256];
xPosition = par2;
zPosition = par3;
BiomeCacheBOPhell.getChunkManager(par1BiomeCache).getTemperatures(temperatureValues, par2 << 4, par3 << 4, 16, 16);
BiomeCacheBOPhell.getChunkManager(par1BiomeCache).getRainfall(rainfallValues, par2 << 4, par3 << 4, 16, 16);
BiomeCacheBOPhell.getChunkManager(par1BiomeCache).getBiomeGenAt(biomes, par2 << 4, par3 << 4, 16, 16, false);
}
2013-05-18 15:06:30 +00:00
2013-05-31 10:34:02 +00:00
public BiomeGenBase getBiomeGenAt(int par1, int par2)
{
return biomes[par1 & 15 | (par2 & 15) << 4];
}
2013-05-18 15:06:30 +00:00
}