forked from pmmp/BedrockProtocol
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 9422c97 Author: IvanCraft623 <[email protected]> Date: Tue Aug 13 19:22:20 2024 -0500 CS fix commit 3b0e82e Author: Dries C <[email protected]> Date: Wed Aug 14 02:07:07 2024 +0200 Fix unread byte in InventoryTransactionPacket commit b6b1ccf Author: Dries C <[email protected]> Date: Tue Aug 13 16:32:28 2024 +0200 Protocol changes for 1.21.20 commit a871e12 Author: Tobias Grether <[email protected]> Date: Tue Aug 13 20:25:54 2024 +0200 Update field order and fix enum values in CorrectPlayerMovePredictionPacket (pmmp#259) commit 5db8d10 Author: Dylan K. Taylor <[email protected]> Date: Tue Aug 13 17:21:12 2024 +0100 Make use of new autogen features in PlayerAuthInputPacket commit a61b555 Author: Dylan K. Taylor <[email protected]> Date: Tue Aug 13 17:20:20 2024 +0100 Allow any static function to have a @generate-create-func tag this allows the creation of internal auto-generated constructors that aren't called create(), which is useful if the public create() wants to do extra validation without losing autogen capability.
- Loading branch information
Showing
48 changed files
with
739 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of BedrockProtocol. | ||
* Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/BedrockProtocol> | ||
* | ||
* BedrockProtocol is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace pocketmine\network\mcpe\protocol; | ||
|
||
use pocketmine\network\mcpe\protocol\serializer\PacketSerializer; | ||
|
||
class CurrentStructureFeaturePacket extends DataPacket implements ClientboundPacket{ | ||
public const NETWORK_ID = ProtocolInfo::CURRENT_STRUCTURE_FEATURE_PACKET; | ||
|
||
public string $currentStructureFeature; | ||
|
||
/** | ||
* @generate-create-func | ||
*/ | ||
public static function create(string $currentStructureFeature) : self{ | ||
$result = new self; | ||
$result->currentStructureFeature = $currentStructureFeature; | ||
return $result; | ||
} | ||
|
||
protected function decodePayload(PacketSerializer $in) : void{ | ||
$this->currentStructureFeature = $in->getString(); | ||
} | ||
|
||
protected function encodePayload(PacketSerializer $out) : void{ | ||
$out->putString($this->currentStructureFeature); | ||
} | ||
|
||
public function handle(PacketHandlerInterface $handler) : bool{ | ||
return $handler->handleCurrentStructureFeature($this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.