26    protected array $actions = [];
 
   32        return $this->actions;
 
 
   35    abstract public function getTypeId() : int;
 
   41    final public function decode(ByteBufferReader $in) : void{
 
   42        $actionCount = VarInt::readUnsignedInt($in);
 
   43        for($i = 0; $i < $actionCount; ++$i){
 
   46        $this->decodeData($in);
 
 
   53    abstract protected function decodeData(ByteBufferReader $in) : void;
 
   55    final public function encode(ByteBufferWriter $out) : void{
 
   56        VarInt::writeUnsignedInt($out, count($this->actions));
 
   57        foreach($this->actions as $action){
 
   60        $this->encodeData($out);
 
   63    abstract protected function encodeData(ByteBufferWriter $out) : void;