mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +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->y = (int) $v->y;
|
||||||
$this->z = (int) $v->z;
|
$this->z = (int) $v->z;
|
||||||
$this->level = $v->level;
|
$this->level = $v->level;
|
||||||
|
$this->boundingBox = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1067,7 +1068,7 @@ class Block extends Position implements Metadatable{
|
|||||||
if($this->boundingBox !== null){
|
if($this->boundingBox !== null){
|
||||||
return $this->boundingBox;
|
return $this->boundingBox;
|
||||||
}else{
|
}else{
|
||||||
return $this->boundingBox = $this->recalculateBoundingBox();
|
return ($this->boundingBox = $this->recalculateBoundingBox());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,7 +565,7 @@ class Item{
|
|||||||
|
|
||||||
public function getBlock(){
|
public function getBlock(){
|
||||||
if($this->block instanceof Block){
|
if($this->block instanceof Block){
|
||||||
return $this->block;
|
return clone $this->block;
|
||||||
}else{
|
}else{
|
||||||
return Block::get(self::AIR);
|
return Block::get(self::AIR);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user