Entity: use temporalVector in checkBlockCollision() instead of creating a new Vector3

This commit is contained in:
Dylan K. Taylor 2018-03-30 12:21:37 +01:00
parent 1d5978df98
commit 4b03dbebba

View File

@ -1708,7 +1708,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
}
protected function checkBlockCollision(){
$vector = new Vector3(0, 0, 0);
$vector = $this->temporalVector->setComponents(0, 0, 0);
foreach($this->getBlocksAround() as $block){
$block->onEntityCollide($this);