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

NBT to SNBT converter fails: "String index out of range: -4"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.15.2, 1.16.3
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      If the tutorial in the German Minecraft wiki is correct (the English one doesn't really have a tutorial, just a general description), then the data generator is broken.

      I made a copy of "level.dat" named "level.nbt" and a copy of "r.-1.-1.mca" named "r.-1.-1.nbt", both result in the same error when I try to convert them:

      [fabian@laptop Downloads]$ java -cp server.jar net.minecraft.data.Main --dev --input "/home/fabian/hdd/drive/minecraft/saves/test/level.nbt" --output "/home/fabian/Downloads/test"
      [16:48:25] [main/INFO]: Starting provider: NBT to SNBT
      Exception in thread "main" [16:48:25] [main/INFO]: [STDERR]: java.lang.StringIndexOutOfBoundsException: String index out of range: -4
      [16:48:25] [main/INFO]: [STDERR]: 	at java.lang.String.substring(String.java:1967)
      [16:48:25] [main/INFO]: [STDERR]: 	at ic.a(SourceFile:43)
      [16:48:25] [main/INFO]: [STDERR]: 	at ic.a(SourceFile:32)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      [16:48:25] [main/INFO]: [STDERR]: 	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      [16:48:25] [main/INFO]: [STDERR]: 	at ic.a(SourceFile:32)
      [16:48:25] [main/INFO]: [STDERR]: 	at gy.c(SourceFile:48)
      [16:48:25] [main/INFO]: [STDERR]: 	at net.minecraft.data.Main.main(SourceFile:55)
      [fabian@laptop Downloads]$ java -cp server.jar net.minecraft.data.Main --dev --input "/home/fabian/hdd/drive/minecraft/saves/test/region/r.-1.-1.nbt" --output "/home/fabian/Downloads/test"
      [16:49:41] [main/INFO]: Starting provider: NBT to SNBT
      Exception in thread "main" [16:49:41] [main/INFO]: [STDERR]: java.lang.StringIndexOutOfBoundsException: String index out of range: -4
      [16:49:41] [main/INFO]: [STDERR]: 	at java.lang.String.substring(String.java:1967)
      [16:49:41] [main/INFO]: [STDERR]: 	at ic.a(SourceFile:43)
      [16:49:41] [main/INFO]: [STDERR]: 	at ic.a(SourceFile:32)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      [16:49:41] [main/INFO]: [STDERR]: 	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
      [16:49:41] [main/INFO]: [STDERR]: 	at ic.a(SourceFile:32)
      [16:49:41] [main/INFO]: [STDERR]: 	at gy.c(SourceFile:48)
      [16:49:41] [main/INFO]: [STDERR]: 	at net.minecraft.data.Main.main(SourceFile:55)
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            FaRo1 Fabian Röling
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: