mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
WTF, ghost objects and why does this fix it? (and btw, fixes #2488)
This commit is contained in:
parent
8e3667c95b
commit
d207a5daea
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user