summaryrefslogtreecommitdiff
path: root/mcmap
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-08-12 14:50:37 +0200
committerKevin Chabowski <kevin@kch42.de>2013-08-12 14:50:37 +0200
commit59d3426e7619b9f30aa4fbf6f0862530e39f7ee6 (patch)
treec6de62036cefd179a10b76e264a62a6593dbf919 /mcmap
parent8fe88da35d5c2aebb8aea1e223a259330e3f5f6a (diff)
downloadgomcmap-59d3426e7619b9f30aa4fbf6f0862530e39f7ee6.tar.gz
gomcmap-59d3426e7619b9f30aa4fbf6f0862530e39f7ee6.tar.bz2
gomcmap-59d3426e7619b9f30aa4fbf6f0862530e39f7ee6.zip
Added functions to get/set biome data.
Diffstat (limited to 'mcmap')
-rw-r--r--mcmap/chunk.go6
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()