mojira.dev
MC-112053

You can create worlds with same lowercase name resulting in multiple worlds using same icon

The bug

You can create multiple worlds with different names which are equal when converted to lowercase. This results in these worlds all using the same icon.

This can be seen on operating systems which allow folders with the same name but different capitalization (like Linux) and with special casing characters.

How to reproduce (Linux)

  1. Create a world

  2. Create a world with the same name but different capitalization
    → You will notice that both worlds use the same icon

How to reproduce (any OS)

  1. Create a world with the name (this is not an "i", please copy the character)

    İ
  2. Create a world with the name (this is not a normal "i", please copy the characters)

    i̇

    → You will notice that both worlds use the same icon

Code analysis

Based on 1.11 decompiled using MCP 9.35 rc1

World icons are accessed with resource locations. These resource locations are always in lowercase. Therefor multiple worlds whose names are equal when converted to lowercase get the same world icon resource location.

As this is how this resource location concept is implemented, the fix should probably be to prevent world folder names which are equal after converting the name to lowercase. This would require an upgrade path which converts existing worlds as well.

Linked issues

Attachments

Comments 3

Can confirm for MC 1.12.1.

Could not reproduce for 1.13.1. See

[media]

Seems fixed. I tried this on 1.12 and the both icons are the same then opened 1.13.1 and the icons were different.

Robert Wadley

(Unassigned)

Confirmed

capitalization, linux, lower-case, resource, unicode, world, world-icon, world-name

Minecraft 1.11.2, Minecraft 1.12.1

Minecraft 1.13.1

Retrieved