Added ChunkSnapShot improvements. Thanks mikeprimm!

Added support for biome data to chunk snapshot
Added method for returning empty chunk snapshot (for ungenerated chunks)

By: EvilSeph <evilseph@unaligned.org>
This commit is contained in:
Bukkit/Spigot
2011-06-17 09:21:56 -04:00
parent f1a6e194ef
commit 05163fbadc
3 changed files with 47 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
package org.bukkit;
import org.bukkit.block.Biome;
/**
* Represents a static, thread-safe snapshot of chunk of blocks
* Purpose is to allow clean, efficient copy of a chunk data to be made, and then handed off for processing in another thread (e.g. map rendering)
@@ -76,6 +77,33 @@ public interface ChunkSnapshot {
*/
int getHighestBlockYAt(int x, int z);
/**
* Get biome at given coordinates
*
* @param x X-coordinate
* @param z Z-coordinate
* @return Biome at given coordinate
*/
Biome getBiome(int x, int z);
/**
* Get raw biome temperature (0.0-1.0) at given coordinate
*
* @param x X-coordinate
* @param z Z-coordinate
* @return temperature at given coordinate
*/
double getRawBiomeTemperature(int x, int z);
/**
* Get raw biome rainfall (0.0-1.0) at given coordinate
*
* @param x X-coordinate
* @param z Z-coordinate
* @return rainfall at given coordinate
*/
double getRawBiomeRainfall(int x, int z);
/**
* Get world full time when chunk snapshot was captured
* @return time in ticks