mojira.dev
MC-297176

/datapack create doesn't allow directory names with spaces or uppercase letters

The bug

The /datapack create command is incorrectly validating names of data packs. Data pack names should be allowed to contain both uppercase and lowercase letters, as well as spaces, since they are essentially directory names. The current behavior seems to follow the same rule as namespaces, only allowing a-z, 0-9, _, - and ., causing inconvenience for data pack makers.

Steps to Reproduce

  1. Create a new world with Allow Commands enabled

  2. Run

    /datapack create "Test" "test description"

    ❌ The command fails

  3. Run

    /datapack create "test" "test description"

    ✔ The data pack is created successfully

  4. Run

    /datapack create "test pack" "test description"

    ❌ The command fails

  5. Run

    /datapack create "test_pack" "test description"

    ✔ The data pack is created successfully

Expected Result

Since the data pack names above are valid, all the commands should execute successfully.

Linked issues

Attachments

Comments 1

Thank you for your report!
We are tracking this issue in MC-296407, so this ticket is being resolved and linked as a duplicate.

That ticket has already been resolved as Works As Intended, which means this is not considered a bug and will not be fixed. Please do not leave a comment on the linked ticket.

If you haven’t already, please make use of the search feature to see whether an issue has already been reported.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

cxc81

(Unassigned)

Unconfirmed

(Unassigned)

25w17a

Retrieved