Open jpenilla opened 4 months ago
The license file has no file extension so mcdev then checks to see if the first 10kb of the file can be interpreted as NBT. The first byte of the Apache 2.0 license is 10 (newline) if you are using unix line endings, which coincidentally is the same as the compound tag ID, which is what is required at the top level of the NBT. I can imagine that from here it's quite easy to produce text files that look like valid NBT for the first 10kb, because the next step is to read the next two bytes as a big-endian length for a string to read.
Now all we have to do is make an NBT polyglot license...
Minecraft Development for IntelliJ plugin version
2023.3-1.7.3
IntelliJ version
IntelliJ IDEA 2023.3.6 (Ultimate Edition) Build #IU-233.15026.9, built on March 20, 2024
Operating System
macOS 14.4
Target platform
No response
Description of the bug
Apache 2.0 LICENSE files often get detected as NBT files and need to have the file type manually overridden to plain text.