public interface BiomeScheme
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.
|
int |
getColour(int biome,
ColourScheme colourScheme)
Get the colour of the specified biome.
|
boolean[][] |
getPattern(int biome)
The two dimensional pattern to use for painting the specified biome, if
any.
|
default java.lang.String |
getStringId(int biome)
Get the technical ID of the specified biome in this biome scheme as a string.
|
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.
|
void setSeed(long seed)
seed
- The seed for which to determine the biomes.int getBiomeCount()
int[] getBiomes(int x, int y, int width, int height)
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.
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.void getBiomes(int x, int y, int width, int height, int[] buffer)
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.int getColour(int biome, ColourScheme colourScheme)
biome
- The biome for which to determine the colour.colourScheme
- A colour scheme which the biome scheme may use, at
its option, for determining the colour.boolean[][] getPattern(int biome)
true
indicates a foreground pixel.biome
- The biome for which to return the pattern.null
if no pattern should be used.java.lang.String getBiomeName(int biome)
biome
- The biome for which to retrieve the name.default java.lang.String getStringId(int biome)
"minecraft:plains"
); for earlier Minecraft versions this is the numerical
ID as a string (i.e. "1"
).
The default implementation returns the biome
parameter as a string if the biome is present; otherwise
it throws a IllegalArgumentException
.
biome
- The biome for which to retrieve the name.boolean isBiomePresent(int biome)
biome
- The biome ID to check.true
if this biome scheme contains the specified
biome.