mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Merge commit 'fc0619ee6e4fa08aba2719e58a9289edd11f0b6e'
# Conflicts: # resources/vanilla # src/network/mcpe/protocol/AddItemActorPacket.php # src/network/mcpe/protocol/AddPlayerPacket.php # src/network/mcpe/protocol/SetActorDataPacket.php # src/network/mcpe/serializer/NetworkBinaryStream.php # src/pocketmine/network/mcpe/protocol/AddActorPacket.php # src/pocketmine/network/mcpe/protocol/LoginPacket.php
This commit is contained in:
@ -103,7 +103,7 @@ class StartGamePacket extends DataPacket implements ClientboundPacket{
|
||||
public $commandsEnabled;
|
||||
/** @var bool */
|
||||
public $isTexturePacksRequired = true;
|
||||
/** @var array */
|
||||
/** @var mixed[][] */
|
||||
public $gameRules = [ //TODO: implement this
|
||||
"naturalregeneration" => [1, false] //Hack for client side regeneration
|
||||
];
|
||||
@ -153,7 +153,7 @@ class StartGamePacket extends DataPacket implements ClientboundPacket{
|
||||
|
||||
/** @var ListTag|null */
|
||||
public $blockTable = null;
|
||||
/** @var array|null string (name) => int16 (legacyID) */
|
||||
/** @var int[]|null string (name) => int16 (legacyID) */
|
||||
public $itemTable = null;
|
||||
|
||||
protected function decodePayload() : void{
|
||||
@ -300,6 +300,9 @@ class StartGamePacket extends DataPacket implements ClientboundPacket{
|
||||
$this->putString($this->multiplayerCorrelationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int[] $table
|
||||
*/
|
||||
private static function serializeItemTable(array $table) : string{
|
||||
$stream = new NetworkBinaryStream();
|
||||
$stream->putUnsignedVarInt(count($table));
|
||||
|
Reference in New Issue
Block a user