37 public static function create(array $resourcePackEntries,
bool $mustAccept,
bool $hasAddons,
bool $hasScripts, UuidInterface $worldTemplateId,
string $worldTemplateVersion) : self{
39 $result->resourcePackEntries = $resourcePackEntries;
40 $result->mustAccept = $mustAccept;
41 $result->hasAddons = $hasAddons;
42 $result->hasScripts = $hasScripts;
43 $result->worldTemplateId = $worldTemplateId;
44 $result->worldTemplateVersion = $worldTemplateVersion;
49 $this->mustAccept = $in->getBool();
50 $this->hasAddons = $in->
getBool();
51 $this->hasScripts = $in->
getBool();
52 $this->worldTemplateId = $in->
getUUID();
53 $this->worldTemplateVersion = $in->
getString();
56 while($resourcePackCount-- > 0){
57 $this->resourcePackEntries[] = ResourcePackInfoEntry::read($in);
62 $out->putBool($this->mustAccept);
63 $out->putBool($this->hasAddons);
64 $out->putBool($this->hasScripts);
65 $out->putUUID($this->worldTemplateId);
66 $out->putString($this->worldTemplateVersion);
67 $out->putLShort(count($this->resourcePackEntries));
68 foreach($this->resourcePackEntries as $entry){