Skip to content

Commit 2b7cc3a

Browse files
committed
Fixes
1 parent 452247d commit 2b7cc3a

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

src/BiomeDefinitionListPacket.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,22 @@ public function buildDefinitionsFromData() : array{
152152
}
153153

154154
/**
155-
* @return BiomeDefinitionData[]
156-
* @phpstan-return list<BiomeDefinitionData>
155+
* @return BiomeDefinitionData[]|null
156+
* @phpstan-return list<BiomeDefinitionData>|null
157157
*/
158-
public function getDefinitionData() : array{ return $this->definitionData; }
158+
public function getDefinitionData() : ?array{ return $this->definitionData; }
159159

160160
/**
161-
* @return string[]
162-
* @phpstan-return list<string>
161+
* @return string[]|null
162+
* @phpstan-return list<string>|null
163163
*/
164-
public function getStrings() : array{ return $this->strings; }
164+
public function getStrings() : ?array{ return $this->strings; }
165+
166+
/**
167+
* @return CacheableNbt<CompoundTag>|null
168+
* @phpstan-return CacheableNbt<CompoundTag>|null
169+
*/
170+
public function getLegacyDefinitions() : ?CacheableNbt{ return $this->legacyDefinitions; }
165171

166172
protected function decodePayload(ByteBufferReader $in, int $protocolId) : void{
167173
if($protocolId < ProtocolInfo::PROTOCOL_1_21_80){

src/UpdateClientInputLocksPacket.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,22 @@
1717
use pmmp\encoding\ByteBufferReader;
1818
use pmmp\encoding\ByteBufferWriter;
1919
use pmmp\encoding\VarInt;
20+
use pocketmine\math\Vector3;
21+
use pocketmine\network\mcpe\protocol\serializer\CommonTypes;
2022

2123
class UpdateClientInputLocksPacket extends DataPacket implements ClientboundPacket{
2224
public const NETWORK_ID = ProtocolInfo::UPDATE_CLIENT_INPUT_LOCKS_PACKET;
2325

2426
private int $flags;
27+
private Vector3 $position;
2528

2629
/**
2730
* @generate-create-func
2831
*/
29-
public static function create(int $flags) : self{
32+
public static function create(int $flags, Vector3 $position) : self{
3033
$result = new self;
3134
$result->flags = $flags;
35+
$result->position = $position;
3236
return $result;
3337
}
3438

0 commit comments

Comments
 (0)