mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Generalize runtime block data serialization
we want to reuse this code for item type data
This commit is contained in:
@ -23,8 +23,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\data\runtime\block\BlockDataReader;
|
||||
use pocketmine\data\runtime\block\BlockDataWriter;
|
||||
use pocketmine\data\runtime\RuntimeDataReader;
|
||||
use pocketmine\data\runtime\RuntimeDataWriter;
|
||||
use pocketmine\event\block\StructureGrowEvent;
|
||||
use pocketmine\item\Bamboo as ItemBamboo;
|
||||
use pocketmine\item\Fertilizer;
|
||||
@ -39,11 +39,11 @@ final class BambooSapling extends Flowable{
|
||||
|
||||
public function getRequiredStateDataBits() : int{ return 1; }
|
||||
|
||||
protected function decodeState(BlockDataReader $r) : void{
|
||||
protected function decodeState(RuntimeDataReader $r) : void{
|
||||
$this->setReady($r->readBool());
|
||||
}
|
||||
|
||||
protected function encodeState(BlockDataWriter $w) : void{
|
||||
protected function encodeState(RuntimeDataWriter $w) : void{
|
||||
$w->writeBool($this->isReady());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user