mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
Entity: use temporalVector in checkBlockCollision() instead of creating a new Vector3
This commit is contained in:
parent
1d5978df98
commit
4b03dbebba
@ -1708,7 +1708,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function checkBlockCollision(){
|
protected function checkBlockCollision(){
|
||||||
$vector = new Vector3(0, 0, 0);
|
$vector = $this->temporalVector->setComponents(0, 0, 0);
|
||||||
|
|
||||||
foreach($this->getBlocksAround() as $block){
|
foreach($this->getBlocksAround() as $block){
|
||||||
$block->onEntityCollide($this);
|
$block->onEntityCollide($this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user