Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-121380

.DS_store files aren't recognized and cause errors when loading data packs.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 17w43b, Minecraft 17w45a
    • None
    • Mac, OS X
    • Confirmed

      When attempting to load ANY files in data packs on a Mac (or any apple computer), such as advancements, functions, or loot tables, they immediately fail, not opening the world, and giving out the following console error:

      Couldn't read loot table minecraft:entities/sheep/.ds_ from minecraft:loot_tables/entities/sheep/.ds_store
      java.io.FileNotFoundException: minecraft:loot_tables/entities/sheep/.ds_store
      	at qa.a(SourceFile:61)
      	at qf.a(SourceFile:59)
      	at bgy.a(SourceFile:54)
      	at qf.a(SourceFile:116)
      	at bgy.<init>(SourceFile:40)
      	at oo.b(SourceFile:163)
      	at chw.a(SourceFile:101)
      	at chw.j(SourceFile:133)
      	at net.minecraft.server.MinecraftServer.run(SourceFile:467)
      	at java.lang.Thread.run(Thread.java:745)
      

      It seems to have something to do with the .ds_store. .DS_Store is how Apple stores folder information, and their users can't get rid of it without quite a bit of hassle. It's a hidden folder, and it causes this bug. The game is ignoring the text past the underscore, and attempting to find the file with that texat, and then failing.

      Then, after the game has done this a few times, it eventually crashes, saying:

      Encountered an unexpected exception
      java.lang.StringIndexOutOfBoundsException: String index out of range: -2
      	at java.lang.String.substring(String.java:1967)
      	at nt.a(SourceFile:141)
      	at qf.a(SourceFile:116)
      	at nt.<init>(SourceFile:61)
      	at oo.b(SourceFile:165)
      	at chw.a(SourceFile:101)
      	at chw.j(SourceFile:133)
      	at net.minecraft.server.MinecraftServer.run(SourceFile:467)
      	at java.lang.Thread.run(Thread.java:745)
      

      The crash report is attached, along with an example of each type of file.

      bug_pack.zip contains an example of trying to replace the abandoned mineshaft loot table, along with examples of custom functions and advancements, along with a custom loot table. All of these fail with their own errors.

      This may be related to MC-121379. Perhaps the game is attempting to load the file as a function, when it really isn't.

            Unassigned Unassigned
            CreeperMagnet_ CreeperMagnet_
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: