mojira.dev
MC-55896

Trading a villager with an invalid Career tag crashes the game

I'm making a custom villager for a map, but he was giving naturally spawned trades when I did a trade, so I gave him a Career tag of 20. 20 is most definitely an invalid career, but I just expected it would see that career and not try to update the trades. CareerLevel was at 30 (and in the fixed Villager, that works fine).

Just having a villager with this tag doesn't hurt anything, but when I tried to trade with him the world crashed.

Here is the command I used to summon the villager:

/summon Villager ~ ~1 ~ {Profession:1,CustomName:3Traiborne,CustomNameVisible:10,Career:1,CareerLevel:10,ActiveEffects:[{Id:11,Amplifier:4,Duration:1000000,Ambient:1,ShowParticles:0}],Offers:{Recipes:[{buy:{id:"minecraft:diamond",Count:1,Damage:0},buyB:{id:"minecraft:emerald",Count:1,Damage:0},sell:{id:"minecraft:potion",Count:1,Damage:8194,tag:{CustomPotionEffects:[{Id:1,Amplifier:2,Duration:2400}]}},maxUses:1000,uses:0},{buy:{id:"minecraft:diamond",Count:5,Damage:0},sell:{id:"minecraft:potion",Count:1,Damage:8196,tag:{CustomPotionEffects:[{Id:8,Amplifier:1,Duration:2400}]}},maxUses:1000,uses:0},{buy:{id:155,Count:0,Damage:1,tag:{display:{Name:"Sorry!"}}},sell:{id:155,Count:0,Damage:1,tag:{display:{Name:"No More Trades!"}}},maxUses:0,uses:0}]}}

And I have a better formatted one attached.

Linked issues

Attachments

Comments 2

Opps, thanks...

I swear, that search function...every time I search I never find the ones I duplicate =P

Although I don't agree with invalid. Anything that crashes the game should at least be looked at...

Void_Concept

(Unassigned)

Unconfirmed

Minecraft 14w21b

Retrieved