Moderator note: Malformed command
The correct command is
summon Villager ~ ~2 ~ {Offers:{Recipes:[{buy:{id:"minecraft:emerald",Count:1},sell:{id:"minecraft:diamond_shovel",tag:{CanDestroy:["gravel"],Count:1}},maxUses:1,uses:0}]}}
However, we think that this is still an issue as the game should print an error message rather than crashing.
Minecraft crashes when I try to buy something from a villager with this command:
summon Villager -101.5 68 193 {Offers:{Recipes:[{buy:{id:minecraft:emerald,Count:1},sell:{id:diamond_shovel{CanDestroy:["gravel"]},Count:1},maxUses:1,uses:0}]}}
To replicate:
1. Create command block and input this command:
summon Villager ~1 ~1 ~1 {Offers:{Recipes:[{buy:{id:minecraft:emerald,Count:1},sell:{id:diamond_shovel{CanDestroy:["gravel"]},Count:1},maxUses:1,uses:0}]}}
2. Activate the command block.
3. Right click the villager.
3. Put an emerald in the space provided.
Description: Updating screen events
java.lang.NullPointerException: Updating screen events
at abe.j(SourceFile:158)
at abe.a(SourceFile:87)
at abk.c(SourceFile:81)
at aac.a(SourceFile:237)
at bmv.a(SourceFile:338)
at bgh.a(SourceFile:513)
at bgh.b(SourceFile:484)
at bfc.d(SourceFile:248)
at bfc.k(SourceFile:219)
at bby.p(SourceFile:1352)
at bby.aj(SourceFile:774)
at bby.f(SourceFile:728)
at net.minecraft.client.main.Main.main(SourceFile:154)
Linked issues
is duplicated by 3
Attachments
Comments 12
Incomplete without a crash report from (minecraft/crash-reports/crash-<DATE>-client.txt
). Please attach it so that we can diagnose your issue.
If you cannot find your Minecraft folder or the crash report, please use the Mojang Support Center.
/summon Villager -101.5 68 193 {Offers:{Recipes:[{buy:{id:minecraft:emerald,Count:1},sell:{id:*diamond_shovel 1 0*{CanDestroy:["gravel"]}
This command is incorrect, the arguments
1 0
are part of the/give
command and can not be used within NBT data structures.