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

Making a villager trade air gives a console error message

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Won't Fix
    • Affects Version/s: Minecraft 1.5.1, Minecraft 1.5.2, Minecraft 14w21b, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.3, Minecraft 1.8.7, Minecraft 15w49b, Minecraft 1.8.9
    • Fix Version/s: None
    • Environment:
      Ubuntu 12.04 LTS 64 bit
      5.7 GB RAM/4.0 allocated
      Intel® Core™ i3-3220 CPU @ 3.30GHz × 4 Processor
      Intel® Ivybridge Desktop Graphics
    • Confirmation Status:
      Community Consensus

      Description

      Whenever you change a villagers trade to air using NBT tag editing and open the trade the game crashes even if you don't trade. I used a mod to create the trade but the game will crash even without it on single player and multiplayer.


      Steps to reproduce in 14w08a:

      • Place command block with
        summon Villager ~ ~-2 ~ {PersistenceRequired: 1,CustomName:Lever Game Champion,CustomNameVisible:1, Attributes:[{Name:generic.movementSpeed,Base:0}],Offers:{Recipes:[ {buy:{id:0},sell:{id:323,Count:1,tag:{display:{Name:”Local Lever Game Champion”,Lore:[“Some day I will beat, the legendry Teep!”]}}}}]}} 
        
      • Pausing the game will yield an exception in the development console:
        [19:49:40 INFO]: Client> [19:49:40] [Server thread/INFO]: Saving chunks for level 'New World222'/Overworld
        [19:49:40 INFO]: Client> s: Saving entity NBT
        [19:49:40 INFO]: Client> 	at sk.e(SourceFile:1123)
        [19:49:40 INFO]: Client> 	at sk.d(SourceFile:1090)
        [19:49:40 INFO]: Client> 	at atc.a(SourceFile:210)
        [19:49:40 INFO]: Client> 	at atc.a(SourceFile:99)
        [19:49:40 INFO]: Client> 	at oa.b(SourceFile:161)
        [19:49:40 INFO]: Client> 	at oa.a(SourceFile:192)
        [19:49:40 INFO]: Client> 	at ob.a(SourceFile:663)
        [19:49:40 INFO]: Client> 	at net.minecraft.server.MinecraftServer.a(SourceFile:305)
        [19:49:40 INFO]: Client> 	at cby.v(SourceFile:124)
        [19:49:40 INFO]: Client> 	at net.minecraft.server.MinecraftServer.run(SourceFile:387)
        [19:49:40 INFO]: Client> 	at mr.run(SourceFile:657)
        [19:49:40 INFO]: Client> Caused by: java.lang.NullPointerException
        [19:49:40 INFO]: Client> 	at aik.j(SourceFile:114)
        [19:49:40 INFO]: Client> 	at ail.a(SourceFile:125)
        [19:49:40 INFO]: Client> 	at aai.b(SourceFile:206)
        [19:49:40 INFO]: Client> 	at sk.e(SourceFile:1111)
        [19:49:40 INFO]: Client> 	... 10 more
        [19:49:40 INFO]: Client> [19:49:40] [Server thread/INFO]: Saving chunks for level 'New World222'/Nether
        [19:49:40 INFO]: Client> [19:49:40] [Server thread/INFO]: Saving chunks for level 'New World222'/The End
        

      Villagers apparently cannot buy air. Doesn't throw exceptions with

      summon Villager ~ ~-2 ~ {PersistenceRequired: 1,CustomName:Lever Game Champion,CustomNameVisible:1, Attributes:[{Name:generic.movementSpeed,Base:0}],Offers:{Recipes:[ {buy:{id:1},sell:{id:323,Count:1,tag:{display:{Name:”Local Lever Game Champion”,Lore:[“Some day I will beat, the legendry Teep!”]}}}}]}} 
      

      Difference:

      buy:{id:0}
      

      -->

      buy:{id:1}
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                grum [Mojang] Grum (Erik Broes)
                Reporter:
                gassypoots Jonathan Ivy
              • Votes:
                4 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: