mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Merge branch master
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
|
||||
namespace pocketmine;
|
||||
|
||||
use pocketmine\block\Air;
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\command\CommandSender;
|
||||
use pocketmine\entity\Arrow;
|
||||
@ -132,6 +133,7 @@ use pocketmine\tile\Tile;
|
||||
use pocketmine\utils\TextFormat;
|
||||
use raklib\Binary;
|
||||
|
||||
|
||||
/**
|
||||
* Main class that handles networking, recovery, and packet sending to the server part
|
||||
*/
|
||||
@ -598,6 +600,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
return $this->sleeping !== null;
|
||||
}
|
||||
|
||||
public function getInAirTicks(){
|
||||
return $this->inAirTicks;
|
||||
}
|
||||
|
||||
protected function switchLevel(Level $targetLevel){
|
||||
$oldLevel = $this->level;
|
||||
if(parent::switchLevel($targetLevel)){
|
||||
@ -2066,6 +2072,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
$this->inventory->sendHeldItem($this);
|
||||
break;
|
||||
}
|
||||
$block = $target->getSide($packet->face);
|
||||
if($block->getId() === Block::FIRE){
|
||||
$this->level->setBlock($block, new Air());
|
||||
}
|
||||
$this->lastBreak = microtime(true);
|
||||
break;
|
||||
case PlayerActionPacket::ACTION_ABORT_BREAK:
|
||||
@ -3470,9 +3480,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $chunkX
|
||||
* @param $chunkZ
|
||||
* @param $payload
|
||||
* @param int $chunkX
|
||||
* @param int $chunkZ
|
||||
* @param string $payload
|
||||
* @param int $ordering
|
||||
*
|
||||
* @return DataPacket
|
||||
*/
|
||||
|
Reference in New Issue
Block a user