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

Recipe parsing returns java.io.EOFException - probably my fault

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 17w50a
    • None
    • Doesn't matter - possibly I did something wrong
    • Unconfirmed

      ISSUE FIXED

      You can close this issue, I indeed have done something wrong.

      The problem

      I tried to make a recipe in the world file (correct path, <world path>\datapacks\spawners\data\code\recipes\ender_capsule.json) but when I enabled the datapack the console returns an EOFException: End of input at line 20 column 2, possibly I did something wrong.

      How to reproduce

      1. Open a server and be sure to be op
      2. Make a datapack and go to the recipes folder
      3. Make a recipe (name doesn't matter)
      4. Paste this:
        {
         "type": "crafting_shaped",
         "group": "Spawners",
         "pattern": [
           "###",
           "#@#",
           "###"
         ],
         "key": {
           "#": {
             "item": "minecraft:feather"
           },
           "@": {
             "item": "minecraft:ender_pearl"
           }
         },
         "result": {
           "item": "minecraft:ender_eye",
           "tag": {"ench":[{"id":-1,"lvl":0}],"display":{"Name":"Ender Capsule"}},
           "count": 1
        }
      5. Save the file and do /reload
      6. Watch the console output say:
        [17:21:31] [Server thread/ERROR]: Parsing error loading recipe code:ender_capsule
        com.google.gson.JsonParseException: java.io.EOFException: End of input at line 21 column 2 path $.result
                at ul.a(SourceFile:495) ~[minecraft_server.17w50a.jar:?]
                at ul.a(SourceFile:518) ~[minecraft_server.17w50a.jar:?]
                at ul.a(SourceFile:538) ~[minecraft_server.17w50a.jar:?]
                at aov.a(SourceFile:48) ~[minecraft_server.17w50a.jar:?]
                at sk.c(SourceFile:132) ~[minecraft_server.17w50a.jar:?]
                at sk.a(SourceFile:115) ~[minecraft_server.17w50a.jar:?]
                at net.minecraft.server.MinecraftServer.a(SourceFile:1308) ~[minecraft_server.17w50a.jar:?]
                at net.minecraft.server.MinecraftServer.aF(SourceFile:1291) ~[minecraft_server.17w50a.jar:?]
                at ox.a(SourceFile:16) ~[minecraft_server.17w50a.jar:?]
                at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:120) [minecraft_server.17w50a.jar:?]
                at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:77) [minecraft_server.17w50a.jar:?]
                at bn.a(SourceFile:184) [minecraft_server.17w50a.jar:?]
                at qe.aR(SourceFile:385) [minecraft_server.17w50a.jar:?]
                at qe.w(SourceFile:353) [minecraft_server.17w50a.jar:?]
                at net.minecraft.server.MinecraftServer.v(SourceFile:592) [minecraft_server.17w50a.jar:?]
                at net.minecraft.server.MinecraftServer.run(SourceFile:497) [minecraft_server.17w50a.jar:?]
                at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]
        Caused by: java.io.EOFException: End of input at line 21 column 2 path $.result
                at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1393) ~[minecraft_server.17w50a.jar:?]
                at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:482) ~[minecraft_server.17w50a.jar:?]
                at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:414) ~[minecraft_server.17w50a.jar:?]
                at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:738) ~[minecraft_server.17w50a.jar:?]
                at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:714) ~[minecraft_server.17w50a.jar:?]
                at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:910) ~[minecraft_server.17w50a.jar:?]
                at ul.a(SourceFile:493) ~[minecraft_server.17w50a.jar:?]
                ... 16 more

      Possibly I did something wrong, wich is very possible. If it is my fault, feel free in telling me what I did wrong.

            Unassigned Unassigned
            MxxHxx11 SnipUndercover
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: