public static interface WorldMapGenerator.BiomeMapper
Modifier and Type | Method and Description |
---|---|
int |
getBiomeCode(int x,
int y)
Gets the most relevant biome code for a given x,y point on the map.
|
java.lang.String[] |
getBiomeNameTable()
Gets a String array where biome codes can be used as indices to look up a name for the biome they refer to.
|
int |
getHeatCode(int x,
int y)
Gets a heat code for a given x,y point on a map, usually as an int between 0 and 5 inclusive.
|
int |
getMoistureCode(int x,
int y)
Gets a moisture code for a given x,y point on a map, usually as an int between 0 and 5 inclusive.
|
void |
makeBiomes(WorldMapGenerator world)
Analyzes the last world produced by the given WorldMapGenerator and uses all of its generated information to
assign biome codes for each cell (along with heat and moisture codes).
|
int getBiomeCode(int x, int y)
getBiomeNameTable()
.
Although different classes may define biome codes differently, they should all be able to be used as indices
into the String array returned by getBiomeNameTable().x
- the x-coordinate on the mapy
- the y-coordinate on the mapgetBiomeNameTable()
int getHeatCode(int x, int y)
x
- the x-coordinate on the mapy
- the y-coordinate on the mapint getMoistureCode(int x, int y)
x
- the x-coordinate on the mapy
- the y-coordinate on the mapjava.lang.String[] getBiomeNameTable()
WorldMapGenerator.SimpleBiomeMapper.biomeTable
; the 61-element array format documented for that
field is encouraged for implementing classes if they use 6 levels of heat and 6 levels of moisture, and track
rivers, coastlines, lakes, and oceans as potentially different types of terrain. Biome codes can be obtained
with getBiomeCode(int, int)
, or for some implementing classes other methods may provide more
detailed information.void makeBiomes(WorldMapGenerator world)
getBiomeCode(int, int)
and used as indices into getBiomeNameTable()
or a
custom biome table.world
- a WorldMapGenerator that should have generated at least one map; it may be at any zoomCopyright © Eben Howard 2012–2022. All rights reserved.