diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index dacdedba47..6dd83da116 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -824,7 +824,7 @@ abstract class Entity extends Position implements Metadatable{ } - if($this->gravity > 0 and $fallingFlag and $this->onGround and ($movX != $dx or $movZ != $dz)){ + if($this->gravity > 0 and $fallingFlag /*and $sneak*/ and ($movX != $dx or $movZ != $dz)){ $cx = $dx; $cy = $dy; $cz = $dz; diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index 6f20f526ad..55a502da75 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -354,7 +354,7 @@ class Level implements ChunkManager, Metadatable{ * @param int $X * @param int $Z * - * @return Player[][] + * @return Player[] */ public function getUsingChunk($X, $Z){ $index = Level::chunkHash($X, $Z); @@ -632,7 +632,12 @@ class Level implements ChunkManager, Metadatable{ * @param int $type */ public function updateAround(Vector3 $pos, $type = self::BLOCK_UPDATE_NORMAL){ - $block = $this->getBlock($pos); + if($pos instanceof Block){ + $block = $pos; + }else{ + $block = $this->getBlock($pos); + } + $block->getSide(0)->onUpdate($type); $block->getSide(1)->onUpdate($type); $block->getSide(2)->onUpdate($type); @@ -776,7 +781,8 @@ class Level implements ChunkManager, Metadatable{ $pk->meta = $block->getDamage(); foreach($this->getUsingChunk($pos->x >> 4, $pos->z >> 4) as $player){ - $player->dataPacket($pk); + /** @var Player $player */ + $player->directDataPacket($pk); } }else{ if(!($pos instanceof Position)){