mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Added Entity->onGround setting when entities keep moving without checks
This commit is contained in:
parent
7eed92e8fb
commit
cbe0fe5e46
@ -818,6 +818,7 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
$this->boundingBox->offset($dx, $dy, $dz);
|
$this->boundingBox->offset($dx, $dy, $dz);
|
||||||
$pos = Vector3::createVector(($this->boundingBox->minX + $this->boundingBox->maxX) / 2, $this->boundingBox->minY - $this->ySize, ($this->boundingBox->minZ + $this->boundingBox->maxZ) / 2);
|
$pos = Vector3::createVector(($this->boundingBox->minX + $this->boundingBox->maxX) / 2, $this->boundingBox->minY - $this->ySize, ($this->boundingBox->minZ + $this->boundingBox->maxZ) / 2);
|
||||||
$this->setPosition($pos);
|
$this->setPosition($pos);
|
||||||
|
$this->onGround = $this instanceof Player ? true : false;
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
Timings::$entityMoveTimer->startTiming();
|
Timings::$entityMoveTimer->startTiming();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user