public abstract class AbstractBiomeInfo extends java.lang.Object implements BiomeScheme
BiomeScheme's which just provide static information about the
supported biomes and cannot calculate biomes).| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBiomeInfo(java.lang.String[] names,
boolean[][][] patterns) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBiomeCount()
Get the number of biomes.
|
java.lang.String |
getBiomeName(int biome)
Get the name of the specified biome in this biome scheme.
|
int[] |
getBiomes(int x,
int y,
int width,
int height)
Get the biomes for a specific rectangular area of the world.
|
void |
getBiomes(int x,
int y,
int width,
int height,
int[] buffer)
Get the biomes for a specific rectangular area of the world.
|
boolean[][] |
getPattern(int biome)
The two dimensional pattern to use for painting the specified biome, if
any.
|
boolean |
isBiomePresent(int biome)
Indicates whether the specified biome ID is present in this biome scheme.
|
void |
setSeed(long seed)
Set the seed for which to determine the biomes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetColour, getStringIdprotected AbstractBiomeInfo(java.lang.String[] names,
boolean[][][] patterns)
public final void setSeed(long seed)
BiomeSchemesetSeed in interface BiomeSchemeseed - The seed for which to determine the biomes.public int getBiomeCount()
BiomeSchemegetBiomeCount in interface BiomeSchemepublic int[] getBiomes(int x,
int y,
int width,
int height)
BiomeSchemeNote: the returned buffer is only valid until the next invocation of this method. If the method is invoked again the results of the buffer may be overwritten or otherwise become invalid.
getBiomes in interface BiomeSchemex - The X coordinate in the WorldPainter coordinate system.y - The Y coordinate in the WorldPainter coordinate system.width - The width along the X axis of the area.height - The height along the Y axis of the area.public void getBiomes(int x,
int y,
int width,
int height,
int[] buffer)
BiomeSchemegetBiomes in interface BiomeSchemex - The X coordinate in the WorldPainter coordinate system.y - The Y coordinate in the WorldPainter coordinate system.width - The width along the X axis of the area.height - The height along the Y axis of the area.buffer - The array in which the biome information will be returned,
indexed first by X and then by Y coordinate.public boolean[][] getPattern(int biome)
BiomeSchemetrue indicates a foreground pixel.getPattern in interface BiomeSchemebiome - The biome for which to return the pattern.null if no pattern should be used.public java.lang.String getBiomeName(int biome)
BiomeSchemegetBiomeName in interface BiomeSchemebiome - The biome for which to retrieve the name.public boolean isBiomePresent(int biome)
BiomeSchemeisBiomePresent in interface BiomeSchemebiome - The biome ID to check.true if this biome scheme contains the specified
biome.