mojira.dev
MC-302239

The validation of the pack_format field is incorrect

If a pack (data pack or resource pack) allows to compatible from before game version 1.21.9 to after 1.21.9, the game will use min_format and max_format to validate pack range, including the valiadation of pack_format field. But pack_format is a number, it should in range [ ? , [64/81] ] (pack format of 1.21.8).

To reproduce, you only add this data pack in 1.21.8 and 1.21.9-pre2. I set its pack.mcmeta this:

{
  "pack": {
    "description": "test",
    "min_format": 18,
    "max_format": 88,
    "pack_format": 87,
    "supported_formats":[18,81]
  }
}

In 1.21.9-pre2, this data pack is validated successfully.

In 1.21.8, this data pack is validated failed. Here is the game log output:

Pack file/test.zip declared support for versions [18, 81] but declared main format is 87, defaulting to 87

Attachments

Comments 0

No comments.

wplxfore

(Unassigned)

Plausible

Platform

Normal

Data Packs

1.21.9 Pre-Release 2, 1.21.9

Retrieved