mojira.dev
MC-45855

Minecraft crashes with this command.

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

Attachments

Comments 12

/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.

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.

Here's the crash report (I removed the "01" from the command and it still crashed.)

Thanks.
Confirmed for Minecraft 14w04b.

2 more comments

Cannot reproduce in 08a

Happens when trying to trade with the villager.

Strange, I can buy him a shovel without the game crashes.

Malformed command does not crash anymore, it just doesn't display the trades.

Cody Shearer

(Unassigned)

Confirmed

Minecraft 14w04b, Minecraft 14w05b, Minecraft 14w06b, Minecraft 14w07a, Minecraft 14w08a

Minecraft 14w34d

Retrieved