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 =
"";
91 $result->internalRead($in);
100 $this->seed = $in->getLLong();
101 $this->spawnSettings = SpawnSettings::read($in);
104 $this->hardcore = $in->
getBool();
107 $this->hasAchievementsDisabled = $in->
getBool();
108 $this->editorWorldType = $in->
getVarInt();
109 $this->createdInEditorMode = $in->
getBool();
110 $this->exportedFromEditorMode = $in->
getBool();
112 $this->eduEditionOffer = $in->
getVarInt();
113 $this->hasEduFeaturesEnabled = $in->
getBool();
114 $this->eduProductUUID = $in->
getString();
116 $this->lightningLevel = $in->
getLFloat();
117 $this->hasConfirmedPlatformLockedContent = $in->
getBool();
118 $this->isMultiplayerGame = $in->
getBool();
119 $this->hasLANBroadcast = $in->
getBool();
120 $this->xboxLiveBroadcastMode = $in->
getVarInt();
121 $this->platformBroadcastMode = $in->
getVarInt();
122 $this->commandsEnabled = $in->
getBool();
123 $this->isTexturePacksRequired = $in->
getBool();
125 $this->experiments = Experiments::read($in);
126 $this->hasBonusChestEnabled = $in->
getBool();
127 $this->hasStartWithMapEnabled = $in->
getBool();
128 $this->defaultPlayerPermission = $in->
getVarInt();
129 $this->serverChunkTickRadius = $in->
getLInt();
130 $this->hasLockedBehaviorPack = $in->
getBool();
131 $this->hasLockedResourcePack = $in->
getBool();
132 $this->isFromLockedWorldTemplate = $in->
getBool();
133 $this->useMsaGamertagsOnly = $in->
getBool();
134 $this->isFromWorldTemplate = $in->
getBool();
135 $this->isWorldTemplateOptionLocked = $in->
getBool();
136 $this->onlySpawnV1Villagers = $in->
getBool();
137 $this->disablePersona = $in->
getBool();
138 $this->disableCustomSkins = $in->
getBool();
139 $this->muteEmoteAnnouncements = $in->
getBool();
140 $this->vanillaVersion = $in->
getString();
141 $this->limitedWorldWidth = $in->
getLInt();
142 $this->limitedWorldLength = $in->
getLInt();
143 $this->isNewNether = $in->
getBool();
144 $this->eduSharedUriResource = EducationUriResource::read($in);
146 $this->chatRestrictionLevel = $in->
getByte();
147 $this->disablePlayerInteractions = $in->
getBool();
148 $this->serverIdentifier = $in->
getString();
149 $this->worldIdentifier = $in->
getString();
150 $this->scenarioIdentifier = $in->
getString();
154 $out->putLLong($this->seed);
155 $this->spawnSettings->write($out);
158 $out->putBool($this->hardcore);
161 $out->putBool($this->hasAchievementsDisabled);
163 $out->putBool($this->createdInEditorMode);
164 $out->putBool($this->exportedFromEditorMode);
167 $out->putBool($this->hasEduFeaturesEnabled);
168 $out->putString($this->eduProductUUID);
169 $out->putLFloat($this->rainLevel);
170 $out->putLFloat($this->lightningLevel);
171 $out->putBool($this->hasConfirmedPlatformLockedContent);
172 $out->putBool($this->isMultiplayerGame);
173 $out->putBool($this->hasLANBroadcast);
174 $out->
putVarInt($this->xboxLiveBroadcastMode);
175 $out->
putVarInt($this->platformBroadcastMode);
176 $out->putBool($this->commandsEnabled);
177 $out->putBool($this->isTexturePacksRequired);
179 $this->experiments->write($out);
180 $out->putBool($this->hasBonusChestEnabled);
181 $out->putBool($this->hasStartWithMapEnabled);
182 $out->
putVarInt($this->defaultPlayerPermission);
183 $out->putLInt($this->serverChunkTickRadius);
184 $out->putBool($this->hasLockedBehaviorPack);
185 $out->putBool($this->hasLockedResourcePack);
186 $out->putBool($this->isFromLockedWorldTemplate);
187 $out->putBool($this->useMsaGamertagsOnly);
188 $out->putBool($this->isFromWorldTemplate);
189 $out->putBool($this->isWorldTemplateOptionLocked);
190 $out->putBool($this->onlySpawnV1Villagers);
191 $out->putBool($this->disablePersona);
192 $out->putBool($this->disableCustomSkins);
193 $out->putBool($this->muteEmoteAnnouncements);
194 $out->putString($this->vanillaVersion);
195 $out->putLInt($this->limitedWorldWidth);
196 $out->putLInt($this->limitedWorldLength);
197 $out->putBool($this->isNewNether);
199 $out->
writeOptional($this->experimentalGameplayOverride, $out->putBool(...));
200 $out->putByte($this->chatRestrictionLevel);
201 $out->putBool($this->disablePlayerInteractions);
202 $out->putString($this->serverIdentifier);
203 $out->putString($this->worldIdentifier);
204 $out->putString($this->scenarioIdentifier);