mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 21:45:35 +00:00
Updated Level::setMiniChunk() and Level::setRawBlock
This commit is contained in:
parent
48b5afac46
commit
95f2f347ff
@ -206,7 +206,15 @@ class Level{
|
||||
}
|
||||
|
||||
public function setBlockRaw(Vector3 $pos, Block $block){
|
||||
return $this->level->setBlock($pos->x, $pos->y, $pos->z, $block->getID(), $block->getMetadata());
|
||||
if(($ret = $this->level->setBlock($pos->x, $pos->y, $pos->z, $block->getID(), $block->getMetadata())) === true){
|
||||
if(!isset($this->changedBlocks[$i])){
|
||||
$this->changedBlocks[$i] = array();
|
||||
$this->changedCount[$i] = 0;
|
||||
}
|
||||
$this->changedBlocks[$i][] = $block;
|
||||
++$this->changedCount[$i];
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function setBlock(Vector3 $pos, Block $block, $update = true, $tiles = false){
|
||||
@ -250,6 +258,7 @@ class Level{
|
||||
}
|
||||
|
||||
public function setMiniChunk($X, $Y, $Z, $data){
|
||||
$this->changedCount[$X.":".$Y.":".$Z] = 4096;
|
||||
return $this->level->setMiniChunk($X, $Y, $Z, $data);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user