tryashtar / nbt-studio

An up-to-date NBT viewer and editor with lots of new features
521 stars 42 forks source link

Saving Bedrock worlds messes with booleans in manifest #36

Closed sparks0 closed 2 years ago

sparks0 commented 2 years ago

Opening a bedrock world using NBT Studio 1.15 using the "Open Folder" button, causes worlds being prepared for the Minecraft Marketplace (which have a manifest.json in the root folder with the level.dat) to have their

"lock_template_options": true

changed from true to 1

This causes the marketplace validator to fail the submission since it only accepts booleans, not integers.

System Information NBT Studio 1.15 Windows 10 Desktop PC (OS BUILD 19044.1645)

Steps to reproduce

  1. Open a world containing a manifest.json using the "Open Folder" option.
  2. Expand the level.dat object
  3. Add a new String Tag called "baseGameVersion" and set the value to "1.18.2" (or otherwise make a change to enable saving)
  4. Save the world using the Save icon.
  5. Observe that "true" has been replaced by "1" in the manifest.json

For your convenience, here is a standard manifest.json which appears in the root folder with the level.dat:


    "header": {
        "name": "pack.name",
        "description": "pack.description",
        "version": [1, 0, 0],
        "uuid": "45b8932f-1cc0-4c22-affd-3bbe24705d22",
        "lock_template_options": true,
        "base_game_version": [1, 18, 2]
    },
    "modules": [
        {
            "version": [1, 0, 0],
            "type": "world_template",
            "uuid": "845ae5ab-a357-4c30-9761-cbeb17d9a17b"
        }
    ],
    "format_version": 2
}
tryashtar commented 2 years ago

Should be fixed now, sorry about that. Kind of a bad fix, but I'm in over my head in this project :(

sparks0 commented 2 years ago

No worries at all, thank you so much for creating this tool, it's super useful, and I just thought I'd report the bug so you could get to it whenever :)