90 string $premiumWorldTemplateId,
95 string $multiplayerCorrelationId,
96 bool $enableNewInventorySystem,
97 string $serverSoftwareVersion,
98 UuidInterface $worldTemplateId,
99 bool $enableClientSideChunkGeneration,
100 bool $blockNetworkIdsAreHashes,
106 $result->actorUniqueId = $actorUniqueId;
107 $result->actorRuntimeId = $actorRuntimeId;
108 $result->playerGamemode = $playerGamemode;
109 $result->playerPosition = $playerPosition;
110 $result->pitch = $pitch;
113 $result->levelSettings = $levelSettings;
114 $result->levelId = $levelId;
115 $result->worldName = $worldName;
116 $result->premiumWorldTemplateId = $premiumWorldTemplateId;
117 $result->isTrial = $isTrial;
118 $result->playerMovementSettings = $playerMovementSettings;
119 $result->currentTick = $currentTick;
120 $result->enchantmentSeed = $enchantmentSeed;
121 $result->multiplayerCorrelationId = $multiplayerCorrelationId;
122 $result->enableNewInventorySystem = $enableNewInventorySystem;
123 $result->serverSoftwareVersion = $serverSoftwareVersion;
124 $result->worldTemplateId = $worldTemplateId;
125 $result->enableClientSideChunkGeneration = $enableClientSideChunkGeneration;
126 $result->blockNetworkIdsAreHashes = $blockNetworkIdsAreHashes;
127 $result->networkPermissions = $networkPermissions;
128 $result->blockPalette = $blockPalette;
134 $this->actorUniqueId = $in->getActorUniqueId();
136 $this->playerGamemode = $in->
getVarInt();
143 $this->levelSettings = LevelSettings::read($in);
147 $this->premiumWorldTemplateId = $in->
getString();
148 $this->isTrial = $in->
getBool();
149 $this->playerMovementSettings = PlayerMovementSettings::read($in);
150 $this->currentTick = $in->
getLLong();
152 $this->enchantmentSeed = $in->
getVarInt();
154 $this->blockPalette = [];
157 $state = $in->getNbtCompoundRoot();
161 $this->multiplayerCorrelationId = $in->
getString();
162 $this->enableNewInventorySystem = $in->
getBool();
163 $this->serverSoftwareVersion = $in->
getString();
164 $this->playerActorProperties =
new CacheableNbt($in->getNbtCompoundRoot());
165 $this->blockPaletteChecksum = $in->
getLLong();
166 $this->worldTemplateId = $in->
getUUID();
167 $this->enableClientSideChunkGeneration = $in->
getBool();
168 $this->blockNetworkIdsAreHashes = $in->
getBool();
169 $this->networkPermissions = NetworkPermissions::decode($in);
173 $out->putActorUniqueId($this->actorUniqueId);
174 $out->putActorRuntimeId($this->actorRuntimeId);
179 $out->putLFloat($this->pitch);
180 $out->putLFloat($this->yaw);
182 $this->levelSettings->write($out);
184 $out->putString($this->levelId);
185 $out->putString($this->worldName);
186 $out->putString($this->premiumWorldTemplateId);
187 $out->putBool($this->isTrial);
188 $this->playerMovementSettings->write($out);
189 $out->putLLong($this->currentTick);
194 foreach($this->blockPalette as $entry){
195 $out->putString($entry->getName());
196 $out->put($entry->getStates()->getEncodedNbt());
199 $out->putString($this->multiplayerCorrelationId);
200 $out->putBool($this->enableNewInventorySystem);
201 $out->putString($this->serverSoftwareVersion);
202 $out->put($this->playerActorProperties->getEncodedNbt());
203 $out->putLLong($this->blockPaletteChecksum);
204 $out->putUUID($this->worldTemplateId);
205 $out->putBool($this->enableClientSideChunkGeneration);
206 $out->putBool($this->blockNetworkIdsAreHashes);
207 $this->networkPermissions->encode($out);