The Bug:
64-bit seeds are not fully retained upon converting from PS4 Legacy Edition to Bedrock. Bedrock already has fully supported 64 bit seeds ever since 1.18.30.
The Cause:
Legacy Console Edition PS4 has always supported 64-bit seeds ever since it’s release due to the other Legacy Console Editions (as well as the legacy PS4 edition) being similar to Java Edition’s game mechanics (such as 64-bit seeds) at the time of PS4 edition’s release, but Bedrock Edition once only had support for 32-bit seeds on its release due to the limitations of Bedrock Edition’s number handler for seeds. The in-game world converter from Legacy PS4 to Bedrock has truncated the seed data from a 64-bit seed to a 32-bit seed when Bedrock Edition first came to the PS4, because back in Bedrock Edition 1.14.0, Bedrock Edition hadn’t supported 64-bit seeds by then.
Once Bedrock Edition finally got 64 bit seeds in 1.18.30 to bring parity with Java Edition, this built-in PS4 Legacy Console Edition to Bedrock Edition world converter oversight regarding 64-bit seeds was yet never fixed.
Based on my assumptions, seeds seem to be truncated according to a byte order in the hardcoded conversion process. In the conversion process, the 64 bit seed (signed) is converted to the 32 bit seed (signed). The first 4 bytes (based on big endian format) are always stripped away and lost in the conversion process. I don’t know exactly how the converter does it since not many players know how this hard-coded in game world converter works, but this is what is seems to be in my perspective…
For example , these bytes (big endian byte sorted) in the original 64 bit seed prior to converting to Bedrock Edition, when the save game is still in the Legacy PS4 console save format (not many people have documented this save format):
00 00 0C 4C 94 CC 80 2D
That would equal the seed 13523053477933.
But during the hardcoded conversion process (big endian byte sorting):
00 00 00 00 94 CC 80 2D
According to the big endian format, The first 4 bytes (assuming a big endian format are wiped permanently. When the data is read starting from hex offset 0x04 (inclusive) of the big endian seed byte, the seed is -1798537171 as a 32-bit number.
After world conversion to Bedrock: ( the bytes are shown as big endian byte sorting here)
FF FF FF FF 94 CC 80 2D
According to the big endian format, The seed is put back into a 64 bit integer again, with the 4 oldest remaining bytes with the 32 bit seed data put after the new 4 bytes filled with FF. But the first 4 bytes of the 64 bit integer have turned to FF (according to big endian format).
The data is once again read starting from the first big endian seed byte (inclusive). As a reformed 64-bit number this would equal the seed: -1798537171.
Steps to Reproduce:
You need access to the Editions button and need to own the PS4 Legacy Console Disc.
While in Bedrock Edition:
Open Bedrock Edition.
Launch Editions.
While in Editions (which is the Legacy Playstation 4 Edition):
Make a new legacy console PS4 default save with a 64 bit seed.
Save and exit the world.
Take note of the exact seed of your world.
Proceed to Launch New Minecraft (Bedrock Edition.)
Once back in Bedrock Edition:
Launch Bedrock Edition.
Convert the world to Bedrock Edition in game, using the storage menu.
Notice the seed has changed to a 32 bit one in the converted world once you go to it’s edit world settings.
Expected result:
The same 64 bit seed should be used in the converted world in Bedrock Edition as it was in the world prior to conversion as Bedrock fully supports 64 bit seeds already since 1.18.30.
Observed result:
The seed became truncated down to a 32 bit seed, even though 64-bit seeds are supported by Bedrock Edition. What 32 bit seed it will become seems to depend on the original PS4 Legacy Edition save game’s 64 bit seed.
Comments 0
No comments.