diff options
author | Kevin Chabowski <kevin@kch42.de> | 2013-08-12 14:50:37 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2013-08-12 14:50:37 +0200 |
commit | 59d3426e7619b9f30aa4fbf6f0862530e39f7ee6 (patch) | |
tree | c6de62036cefd179a10b76e264a62a6593dbf919 | |
parent | 8fe88da35d5c2aebb8aea1e223a259330e3f5f6a (diff) | |
download | gomcmap-59d3426e7619b9f30aa4fbf6f0862530e39f7ee6.tar.gz gomcmap-59d3426e7619b9f30aa4fbf6f0862530e39f7ee6.tar.bz2 gomcmap-59d3426e7619b9f30aa4fbf6f0862530e39f7ee6.zip |
Added functions to get/set biome data.
-rw-r--r-- | mcmap/chunk.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mcmap/chunk.go b/mcmap/chunk.go index c504ae5..0ba12f8 100644 --- a/mcmap/chunk.go +++ b/mcmap/chunk.go @@ -84,4 +84,10 @@ func (c *Chunk) Height(x, z int) int { return int(c.heightMap[z*16+x]) } +// Biome gets the Biome at x,z. +func (c *Chunk) Biome(x, z int) Biome { return c.biomes[x*16+z] } + +// SetBiome sets the biome at x,z. +func (c *Chunk) SetBiome(x, z int, bio Biome) { c.biomes[x*16+z] = bio } + // TODO: func (c *Chunk) RecalcHeightMap() |