26 public int $generator = GeneratorType::OVERWORLD;
27 public int $worldGamemode;
28 public bool $hardcore =
false;
29 public int $difficulty;
31 public bool $hasAchievementsDisabled =
true;
32 public int $editorWorldType = EditorWorldType::NON_EDITOR;
33 public bool $createdInEditorMode =
false;
34 public bool $exportedFromEditorMode =
false;
35 public int $time = -1;
36 public int $eduEditionOffer = EducationEditionOffer::NONE;
37 public bool $hasEduFeaturesEnabled =
false;
38 public string $eduProductUUID =
"";
39 public float $rainLevel;
40 public float $lightningLevel;
41 public bool $hasConfirmedPlatformLockedContent =
false;
42 public bool $isMultiplayerGame =
true;
43 public bool $hasLANBroadcast =
true;
44 public int $xboxLiveBroadcastMode = MultiplayerGameVisibility::PUBLIC;
45 public int $platformBroadcastMode = MultiplayerGameVisibility::PUBLIC;
46 public bool $commandsEnabled;
47 public bool $isTexturePacksRequired =
true;
52 public array $gameRules = [];
54 public bool $hasBonusChestEnabled =
false;
55 public bool $hasStartWithMapEnabled =
false;
56 public int $defaultPlayerPermission = PlayerPermissions::MEMBER;
58 public int $serverChunkTickRadius = 4;
60 public bool $hasLockedBehaviorPack =
false;
61 public bool $hasLockedResourcePack =
false;
62 public bool $isFromLockedWorldTemplate =
false;
63 public bool $useMsaGamertagsOnly =
false;
64 public bool $isFromWorldTemplate =
false;
65 public bool $isWorldTemplateOptionLocked =
false;
66 public bool $onlySpawnV1Villagers =
false;
67 public bool $disablePersona =
false;
68 public bool $disableCustomSkins =
false;
69 public bool $muteEmoteAnnouncements =
false;
71 public int $limitedWorldWidth = 0;
72 public int $limitedWorldLength = 0;
73 public bool $isNewNether =
true;
75 public ?
bool $experimentalGameplayOverride =
null;
76 public int $chatRestrictionLevel = ChatRestrictionLevel::NONE;
77 public bool $disablePlayerInteractions =
false;
79 public string $serverIdentifier =
"";
80 public string $worldIdentifier =
"";
81 public string $scenarioIdentifier =
"";
82 public string $ownerIdentifier =
"";
92 $result->internalRead($in);
101 $this->seed = $in->getLLong();
102 $this->spawnSettings = SpawnSettings::read($in);
105 $this->hardcore = $in->
getBool();
108 $this->hasAchievementsDisabled = $in->
getBool();
109 $this->editorWorldType = $in->
getVarInt();
110 $this->createdInEditorMode = $in->
getBool();
111 $this->exportedFromEditorMode = $in->
getBool();
113 $this->eduEditionOffer = $in->
getVarInt();
114 $this->hasEduFeaturesEnabled = $in->
getBool();
115 $this->eduProductUUID = $in->
getString();
117 $this->lightningLevel = $in->
getLFloat();
118 $this->hasConfirmedPlatformLockedContent = $in->
getBool();
119 $this->isMultiplayerGame = $in->
getBool();
120 $this->hasLANBroadcast = $in->
getBool();
121 $this->xboxLiveBroadcastMode = $in->
getVarInt();
122 $this->platformBroadcastMode = $in->
getVarInt();
123 $this->commandsEnabled = $in->
getBool();
124 $this->isTexturePacksRequired = $in->
getBool();
126 $this->experiments = Experiments::read($in);
127 $this->hasBonusChestEnabled = $in->
getBool();
128 $this->hasStartWithMapEnabled = $in->
getBool();
129 $this->defaultPlayerPermission = $in->
getVarInt();
130 $this->serverChunkTickRadius = $in->
getLInt();
131 $this->hasLockedBehaviorPack = $in->
getBool();
132 $this->hasLockedResourcePack = $in->
getBool();
133 $this->isFromLockedWorldTemplate = $in->
getBool();
134 $this->useMsaGamertagsOnly = $in->
getBool();
135 $this->isFromWorldTemplate = $in->
getBool();
136 $this->isWorldTemplateOptionLocked = $in->
getBool();
137 $this->onlySpawnV1Villagers = $in->
getBool();
138 $this->disablePersona = $in->
getBool();
139 $this->disableCustomSkins = $in->
getBool();
140 $this->muteEmoteAnnouncements = $in->
getBool();
141 $this->vanillaVersion = $in->
getString();
142 $this->limitedWorldWidth = $in->
getLInt();
143 $this->limitedWorldLength = $in->
getLInt();
144 $this->isNewNether = $in->
getBool();
145 $this->eduSharedUriResource = EducationUriResource::read($in);
147 $this->chatRestrictionLevel = $in->
getByte();
148 $this->disablePlayerInteractions = $in->
getBool();
149 $this->serverIdentifier = $in->
getString();
150 $this->worldIdentifier = $in->
getString();
151 $this->scenarioIdentifier = $in->
getString();
152 $this->ownerIdentifier = $in->
getString();
156 $out->putLLong($this->seed);
157 $this->spawnSettings->write($out);
160 $out->putBool($this->hardcore);
163 $out->putBool($this->hasAchievementsDisabled);
165 $out->putBool($this->createdInEditorMode);
166 $out->putBool($this->exportedFromEditorMode);
169 $out->putBool($this->hasEduFeaturesEnabled);
170 $out->putString($this->eduProductUUID);
171 $out->putLFloat($this->rainLevel);
172 $out->putLFloat($this->lightningLevel);
173 $out->putBool($this->hasConfirmedPlatformLockedContent);
174 $out->putBool($this->isMultiplayerGame);
175 $out->putBool($this->hasLANBroadcast);
176 $out->
putVarInt($this->xboxLiveBroadcastMode);
177 $out->
putVarInt($this->platformBroadcastMode);
178 $out->putBool($this->commandsEnabled);
179 $out->putBool($this->isTexturePacksRequired);
181 $this->experiments->write($out);
182 $out->putBool($this->hasBonusChestEnabled);
183 $out->putBool($this->hasStartWithMapEnabled);
184 $out->
putVarInt($this->defaultPlayerPermission);
185 $out->putLInt($this->serverChunkTickRadius);
186 $out->putBool($this->hasLockedBehaviorPack);
187 $out->putBool($this->hasLockedResourcePack);
188 $out->putBool($this->isFromLockedWorldTemplate);
189 $out->putBool($this->useMsaGamertagsOnly);
190 $out->putBool($this->isFromWorldTemplate);
191 $out->putBool($this->isWorldTemplateOptionLocked);
192 $out->putBool($this->onlySpawnV1Villagers);
193 $out->putBool($this->disablePersona);
194 $out->putBool($this->disableCustomSkins);
195 $out->putBool($this->muteEmoteAnnouncements);
196 $out->putString($this->vanillaVersion);
197 $out->putLInt($this->limitedWorldWidth);
198 $out->putLInt($this->limitedWorldLength);
199 $out->putBool($this->isNewNether);
201 $out->
writeOptional($this->experimentalGameplayOverride, $out->putBool(...));
202 $out->putByte($this->chatRestrictionLevel);
203 $out->putBool($this->disablePlayerInteractions);
204 $out->putString($this->serverIdentifier);
205 $out->putString($this->worldIdentifier);
206 $out->putString($this->scenarioIdentifier);
207 $out->putString($this->ownerIdentifier);