91 string $premiumWorldTemplateId,
96 string $multiplayerCorrelationId,
97 bool $enableNewInventorySystem,
98 string $serverSoftwareVersion,
99 UuidInterface $worldTemplateId,
100 bool $enableClientSideChunkGeneration,
101 bool $blockNetworkIdsAreHashes,
102 bool $enableTickDeathSystems,
108 $result->actorUniqueId = $actorUniqueId;
109 $result->actorRuntimeId = $actorRuntimeId;
110 $result->playerGamemode = $playerGamemode;
111 $result->playerPosition = $playerPosition;
112 $result->pitch = $pitch;
115 $result->levelSettings = $levelSettings;
116 $result->levelId = $levelId;
117 $result->worldName = $worldName;
118 $result->premiumWorldTemplateId = $premiumWorldTemplateId;
119 $result->isTrial = $isTrial;
120 $result->playerMovementSettings = $playerMovementSettings;
121 $result->currentTick = $currentTick;
122 $result->enchantmentSeed = $enchantmentSeed;
123 $result->multiplayerCorrelationId = $multiplayerCorrelationId;
124 $result->enableNewInventorySystem = $enableNewInventorySystem;
125 $result->serverSoftwareVersion = $serverSoftwareVersion;
126 $result->worldTemplateId = $worldTemplateId;
127 $result->enableClientSideChunkGeneration = $enableClientSideChunkGeneration;
128 $result->blockNetworkIdsAreHashes = $blockNetworkIdsAreHashes;
129 $result->enableTickDeathSystems = $enableTickDeathSystems;
130 $result->networkPermissions = $networkPermissions;
131 $result->blockPalette = $blockPalette;
137 $this->actorUniqueId = $in->getActorUniqueId();
139 $this->playerGamemode = $in->
getVarInt();
146 $this->levelSettings = LevelSettings::read($in);
150 $this->premiumWorldTemplateId = $in->
getString();
151 $this->isTrial = $in->
getBool();
152 $this->playerMovementSettings = PlayerMovementSettings::read($in);
153 $this->currentTick = $in->
getLLong();
155 $this->enchantmentSeed = $in->
getVarInt();
157 $this->blockPalette = [];
160 $state = $in->getNbtCompoundRoot();
164 $this->multiplayerCorrelationId = $in->
getString();
165 $this->enableNewInventorySystem = $in->
getBool();
166 $this->serverSoftwareVersion = $in->
getString();
167 $this->playerActorProperties =
new CacheableNbt($in->getNbtCompoundRoot());
168 $this->blockPaletteChecksum = $in->
getLLong();
169 $this->worldTemplateId = $in->
getUUID();
170 $this->enableClientSideChunkGeneration = $in->
getBool();
171 $this->blockNetworkIdsAreHashes = $in->
getBool();
172 $this->enableTickDeathSystems = $in->
getBool();
173 $this->networkPermissions = NetworkPermissions::decode($in);
177 $out->putActorUniqueId($this->actorUniqueId);
178 $out->putActorRuntimeId($this->actorRuntimeId);
183 $out->putLFloat($this->pitch);
184 $out->putLFloat($this->yaw);
186 $this->levelSettings->write($out);
188 $out->putString($this->levelId);
189 $out->putString($this->worldName);
190 $out->putString($this->premiumWorldTemplateId);
191 $out->putBool($this->isTrial);
192 $this->playerMovementSettings->write($out);
193 $out->putLLong($this->currentTick);
198 foreach($this->blockPalette as $entry){
199 $out->putString($entry->getName());
200 $out->put($entry->getStates()->getEncodedNbt());
203 $out->putString($this->multiplayerCorrelationId);
204 $out->putBool($this->enableNewInventorySystem);
205 $out->putString($this->serverSoftwareVersion);
206 $out->put($this->playerActorProperties->getEncodedNbt());
207 $out->putLLong($this->blockPaletteChecksum);
208 $out->putUUID($this->worldTemplateId);
209 $out->putBool($this->enableClientSideChunkGeneration);
210 $out->putBool($this->blockNetworkIdsAreHashes);
211 $out->putBool($this->enableTickDeathSystems);
212 $this->networkPermissions->encode($out);