Added HeightMap get/set methods on chunks, Level

This commit is contained in:
Shoghi Cervantes
2014-12-07 18:02:07 +01:00
parent 964bf98ca6
commit e4557a2e8e
6 changed files with 84 additions and 23 deletions

View File

@ -1634,6 +1634,16 @@ class Level implements ChunkManager, Metadatable{
return $this->getChunk($x >> 4, $z >> 4, true)->getBiomeColor($x & 0x0f, $z & 0x0f);
}
/**
* @param int $x
* @param int $z
*
* @return int
*/
public function getHeightMap($x, $z){
return $this->getChunk($x >> 4, $z >> 4, true)->getHeightMap($x & 0x0f, $z & 0x0f);
}
/**
* @param int $x
* @param int $z
@ -1654,6 +1664,15 @@ class Level implements ChunkManager, Metadatable{
$this->getChunk($x >> 4, $z >> 4, true)->setBiomeColor($x & 0x0f, $z & 0x0f, $R, $G, $B);
}
/**
* @param int $x
* @param int $z
* @param int $value
*/
public function setHeightMap($x, $z, $value){
$this->getChunk($x >> 4, $z >> 4, true)->setHeightMap($x & 0x0f, $z & 0x0f, $value);
}
/**
* Gets the Chunk object
*