mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-08 04:38:35 +00:00
Entity: rename checkBlockCollisions() to checkBlockIntersections()
This commit is contained in:
parent
8be1f34736
commit
73cc841d0b
@ -632,7 +632,7 @@ abstract class Entity{
|
|||||||
|
|
||||||
$hasUpdate = false;
|
$hasUpdate = false;
|
||||||
|
|
||||||
$this->checkBlockCollision();
|
$this->checkBlockIntersections();
|
||||||
|
|
||||||
if($this->location->y <= -16 and $this->isAlive()){
|
if($this->location->y <= -16 and $this->isAlive()){
|
||||||
$ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_VOID, 10);
|
$ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_VOID, 10);
|
||||||
@ -1181,7 +1181,7 @@ abstract class Entity{
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->getWorld()->onEntityMoved($this);
|
$this->getWorld()->onEntityMoved($this);
|
||||||
$this->checkBlockCollision();
|
$this->checkBlockIntersections();
|
||||||
$this->checkGroundState($movX, $movY, $movZ, $dx, $dy, $dz);
|
$this->checkGroundState($movX, $movY, $movZ, $dx, $dy, $dz);
|
||||||
$this->updateFallState($dy, $this->onGround);
|
$this->updateFallState($dy, $this->onGround);
|
||||||
|
|
||||||
@ -1243,7 +1243,7 @@ abstract class Entity{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkBlockCollision() : void{
|
protected function checkBlockIntersections() : void{
|
||||||
$vectors = [];
|
$vectors = [];
|
||||||
|
|
||||||
foreach($this->getBlocksAroundWithEntityInsideActions() as $block){
|
foreach($this->getBlocksAroundWithEntityInsideActions() as $block){
|
||||||
|
@ -262,7 +262,7 @@ abstract class Projectile extends Entity{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->getWorld()->onEntityMoved($this);
|
$this->getWorld()->onEntityMoved($this);
|
||||||
$this->checkBlockCollision();
|
$this->checkBlockIntersections();
|
||||||
|
|
||||||
Timings::$entityMove->stopTiming();
|
Timings::$entityMove->stopTiming();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user