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, wait
getColour, getStringId
protected AbstractBiomeInfo(java.lang.String[] names, boolean[][][] patterns)
public final void setSeed(long seed)
BiomeScheme
setSeed
in interface BiomeScheme
seed
- The seed for which to determine the biomes.public int getBiomeCount()
BiomeScheme
getBiomeCount
in interface BiomeScheme
public int[] getBiomes(int x, int y, int width, int height)
BiomeScheme
Note: 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 BiomeScheme
x
- 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)
BiomeScheme
getBiomes
in interface BiomeScheme
x
- 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)
BiomeScheme
true
indicates a foreground pixel.getPattern
in interface BiomeScheme
biome
- The biome for which to return the pattern.null
if no pattern should be used.public java.lang.String getBiomeName(int biome)
BiomeScheme
getBiomeName
in interface BiomeScheme
biome
- The biome for which to retrieve the name.public boolean isBiomePresent(int biome)
BiomeScheme
isBiomePresent
in interface BiomeScheme
biome
- The biome ID to check.true
if this biome scheme contains the specified
biome.