From 59d3426e7619b9f30aa4fbf6f0862530e39f7ee6 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Mon, 12 Aug 2013 14:50:37 +0200 Subject: Added functions to get/set biome data. --- mcmap/chunk.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mcmap') 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() -- cgit v1.2.3-70-g09d2