39 public static function create(array $resourcePackStack, array $behaviorPackStack,
bool $mustAccept,
string $baseGameVersion,
Experiments $experiments,
bool $useVanillaEditorPacks) : self{
41 $result->resourcePackStack = $resourcePackStack;
42 $result->behaviorPackStack = $behaviorPackStack;
43 $result->mustAccept = $mustAccept;
44 $result->baseGameVersion = $baseGameVersion;
45 $result->experiments = $experiments;
46 $result->useVanillaEditorPacks = $useVanillaEditorPacks;
51 $this->mustAccept = $in->getBool();
53 while($behaviorPackCount-- > 0){
54 $this->behaviorPackStack[] = ResourcePackStackEntry::read($in);
58 while($resourcePackCount-- > 0){
59 $this->resourcePackStack[] = ResourcePackStackEntry::read($in);
62 $this->baseGameVersion = $in->
getString();
63 $this->experiments = Experiments::read($in);
64 $this->useVanillaEditorPacks = $in->
getBool();
68 $out->putBool($this->mustAccept);
71 foreach($this->behaviorPackStack as $entry){
76 foreach($this->resourcePackStack as $entry){
80 $out->putString($this->baseGameVersion);
81 $this->experiments->write($out);
82 $out->putBool($this->useVanillaEditorPacks);