mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Improved Player flight detection after setMotion(), other method improvement
This commit is contained in:
@ -96,13 +96,12 @@ class FallingSand extends Entity{
|
||||
|
||||
if(!$this->dead){
|
||||
if($this->ticksLived === 1){
|
||||
$block = $this->level->getBlock($pos = (new Vector3($this->x, $this->y, $this->z))->floor());
|
||||
if($block->getId() != $this->blockId){
|
||||
$block = $this->level->getBlock($pos = (new Vector3($this->x - 0.5, $this->y - 0.5, $this->z - 0.5))->floor());
|
||||
if($block->getId() !== $this->blockId){
|
||||
$this->kill();
|
||||
return true;
|
||||
}
|
||||
$this->level->setBlock($pos, Block::get(0), true);
|
||||
|
||||
}
|
||||
|
||||
$this->motionY -= $this->gravity;
|
||||
|
Reference in New Issue
Block a user