mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Fixed fall damage in 1 block of water, close #470
This commit is contained in:
parent
eaef2bd169
commit
c4f461f65d
@ -1301,6 +1301,8 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->blocksAround = null;
|
||||||
|
|
||||||
if($this->keepMovement){
|
if($this->keepMovement){
|
||||||
$this->boundingBox->offset($dx, $dy, $dz);
|
$this->boundingBox->offset($dx, $dy, $dz);
|
||||||
$this->setPosition($this->temporalVector->setComponents(($this->boundingBox->minX + $this->boundingBox->maxX) / 2, $this->boundingBox->minY, ($this->boundingBox->minZ + $this->boundingBox->maxZ) / 2));
|
$this->setPosition($this->temporalVector->setComponents(($this->boundingBox->minX + $this->boundingBox->maxX) / 2, $this->boundingBox->minY, ($this->boundingBox->minZ + $this->boundingBox->maxZ) / 2));
|
||||||
@ -1429,7 +1431,7 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
$this->z = ($this->boundingBox->minZ + $this->boundingBox->maxZ) / 2;
|
$this->z = ($this->boundingBox->minZ + $this->boundingBox->maxZ) / 2;
|
||||||
|
|
||||||
$this->checkChunks();
|
$this->checkChunks();
|
||||||
|
$this->checkBlockCollision();
|
||||||
$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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user