mojira.dev
MC-110592

Server fails to load data files with uppercase characters

In environments with case-sensitive paths, the server fails to load structures named with uppercase letters, despite a matching structure file existing.

Example
http://jragoncommands.weebly.com/tempests-box.html
http://www.mediafire.com/file/0a1t26czd2e30ew/Tempest_Resources_Version_0.4.zip

Loading these structures on macOS with a case-insensitive volume works perfectly. For example, placing a new structure block and loading structure "TTB" works.

Performing the same steps on a CentOS 7 / Linux server does not work; it displays a "Structure TTB not available" error, even though TTB.nbt exists in the world's structures folder.

Workaround
Renaming all nbt structure files to their lowercase equivalents allows the server to load the structures, even with their original names. For example, renaming "TTB.nbt" --> "ttb.nbt" and loading the "TTB" structure in-game works.

Proposed Solution
The server should fully respect capitalization and save structures with filenames matching the structure's name: i.e. TTB -> TTB.nbt and then look for TTB.nbt (rather than ttb.nbt). It appears that the server currently converts the name to lower case before loading the file.

Alternatively, the server should allow loading of structures regardless of capitalization in the name, treating TTB and ttb interchangeably, loading any variation of filename. In other words, for a structure called "TTB", the server should work with any manner of capitalization of the corresponding nbt file.

Linked issues

Comments 2

I can confirm this, as well.

Looking at decompiled source of the 1.11 server release, I found where it converts to lowercase:
net/minecraft/server/MinecraftKey.class

It stores the name in a String (named "a", in this obfuscation) which is what's used to make the File reference.
This occurs in the constructor, and it's here that it converts the text to lowercase.

Just lowercase supported.

Justin Head

Erik Broes

Confirmed

Minecraft 1.11

Retrieved