1
0
mirror of https://github.com/pmmp/PocketMine-MP.git synced 2025-07-09 11:31:49 +00:00

WTF, ghost objects and why does this fix it? (and btw, fixes )

This commit is contained in:
Shoghi Cervantes 2015-01-03 03:38:25 +01:00
parent 8e3667c95b
commit d207a5daea
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89
2 changed files with 3 additions and 2 deletions
src/pocketmine

@ -987,6 +987,7 @@ class Block extends Position implements Metadatable{
$this->y = (int) $v->y;
$this->z = (int) $v->z;
$this->level = $v->level;
$this->boundingBox = null;
}
/**
@ -1067,7 +1068,7 @@ class Block extends Position implements Metadatable{
if($this->boundingBox !== null){
return $this->boundingBox;
}else{
return $this->boundingBox = $this->recalculateBoundingBox();
return ($this->boundingBox = $this->recalculateBoundingBox());
}
}

@ -565,7 +565,7 @@ class Item{
public function getBlock(){
if($this->block instanceof Block){
return $this->block;
return clone $this->block;
}else{
return Block::get(self::AIR);
}