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

Client/server disagreement when using a knowledge book with invalid recipes

    Details

    • Confirmation Status:
      Confirmed

      Description

      To reproduce, give yourself a knowledge book with an invalid recipe anywhere inside:

      /give @p knowledge_book 1 0 {Recipes:["diamond_pickaxe","example-invalid-recipe"]}
      

      Attempt to use the book. None of the valid recipes inside (if any) will be learned, and the book will appear to have been consumed client-side, but updating the slot (e.g. dropping the item) will reveal it still exists.

      Additionally the following fatal error is logged:

      17w17b
      [18:32:54] [Server thread/FATAL]: Error executing task
      java.util.concurrent.ExecutionException: java.lang.NullPointerException
      	at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_131]
      	at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_131]
      	at h.a(SourceFile:47) [17w17b.jar:?]
      	at net.minecraft.server.MinecraftServer.D(SourceFile:606) [17w17b.jar:?]
      	at net.minecraft.server.MinecraftServer.C(SourceFile:562) [17w17b.jar:?]
      	at cgc.C(SourceFile:154) [17w17b.jar:?]
      	at net.minecraft.server.MinecraftServer.run(SourceFile:466) [17w17b.jar:?]
      	at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
      Caused by: java.lang.NullPointerException
      	at pr.a(SourceFile:34) ~[17w17b.jar:?]
      	at ps.a(SourceFile:25) ~[17w17b.jar:?]
      	at ps.a(SourceFile:32) ~[17w17b.jar:?]
      	at nv.a(SourceFile:909) ~[17w17b.jar:?]
      	at nv.a(SourceFile:919) ~[17w17b.jar:?]
      	at ahv.a(SourceFile:40) ~[17w17b.jar:?]
      	at ahs.a(SourceFile:192) ~[17w17b.jar:?]
      	at nw.a(SourceFile:266) ~[17w17b.jar:?]
      	at of.a(SourceFile:671) ~[17w17b.jar:?]
      	at li.a(SourceFile:32) ~[17w17b.jar:?]
      	at li.a(SourceFile:9) ~[17w17b.jar:?]
      	at hf$1.run(SourceFile:13) ~[17w17b.jar:?]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_131]
      	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_131]
      	at h.a(SourceFile:46) ~[17w17b.jar:?]
      	... 5 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Excited [Mojang] Maria Lemón
                Reporter:
                tryashtar [Mod] tryashtar
              • Votes:
                4 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: