0

Just a heads up, if I seem inexperienced in typing my question in a certain style, please forgive me!

I used a command generator, from this link, to spawn a villager who sells custom weapons.

However, the generator does not support villagers selling custom WEAPONS, only custom ITEMS. That means I have to enter the values myself, given the format provided. I have 2 more of such commands and they work perfectly fine, but only this one has a persistent problem.

Anyway, I wish to spawn a villager that trades 8 nether stars and 1 diamond for a custom pickaxe weapon, but the result was shown in the picture attached here.

This is the whole command:

/summon Villager ~1 ~ ~ {Profession:0,CustomName:"The Shop Elf #3",CustomNameVisible:1,Career:1,CareerLevel:42,CanPickUpLoot:0,PersistenceRequired:1,Invulnerable:1,Attributes:\[{Name:"generic.knockbackResistance",Base:"1f"},{Name:"generic.movementSpeed",Base:"0f"},{Name:"generic.maxHealth",Base:99999}\],Offers:{Recipes:\[{buy:{id:"nether_star",Count:5},buyB:{id:"gold_ingot",Count:1},maxUses:9999999,sell:{id:"golden_hoe",Count:1,tag:{display:{Name:"The Lucky Golden Scythe",Lore:\["Is that really gold... or just children's glitter?","You get more resources by slaying mobs."\]},ench:\[{id:16,lvl:3},{id:21,lvl:3},{id:34,lvl:2},{id:35,lvl:5}\]},MaxUses:9999999},rewardExp:false},{buy:{id:"nether_star",Count:7},buyB:{id:"dye",Count:1,Damage:1},maxUses:9999999,sell:{id:"golden_hoe",Count:1,tag:{display:{Name:"Mace of Tarrasque",Lore:\["Preserves the blood of an extinct monster.","Boosts your health dramatically."\]},AttributeModifiers:\[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:50,Operation:0,UUIDMost:30803,UUIDLeast:806745},{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:1,Operation:1,UUIDMost:34336,UUIDLeast:736873}\],ench:\[{id:16,lvl:1},{id:19,lvl:3},{id:21,lvl:1},{id:34,lvl:5},{id:35,lvl:1}\]},MaxUses:9999999},rewardExp:false},{buy:{id:"nether_star",Count:8},buyB:{id:"diamond",Count:1, maxUses:9999999,sell:{id:"diamond_pickaxe",Count:1,tag:{display:{Name:"Sapphire Daedalus",Lore:\["The second most powerful weapon of the land.","Extremely high damage and health."\]},AttributeModifiers:\[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:35,Operation:0,UUIDMost:90871,UUIDLeast:499725},{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0,Operation:0,UUIDMost:66479,UUIDLeast:426152}\],ench:\[{id:16,lvl:5},{id:17,lvl:5},{id:18,lvl:5},{id:19,lvl:5},{id:20,lvl:5},{id:21,lvl:1},{id:34,lvl:1},{id:35,lvl:1}\]},MaxUses:9999999},rewardExp:false}}]}}

and this is the part of the command responsible for summoning the desired custom pickaxe:

{buy:{id:"nether_star",Count:8},buyB:{id:"diamond",Count:1, maxUses:9999999,sell:{id:"diamond_pickaxe",Count:1,tag:{display:{Name:"Sapphire Daedalus",Lore:["The second most powerful weapon of the land.","Extremely high damage and health."]},AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:35,Operation:0,UUIDMost:90871,UUIDLeast:499725},{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0,Operation:0,UUIDMost:66479,UUIDLeast:426152}],ench:[{id:16,lvl:5},{id:17,lvl:5},{id:18,lvl:5},{id:19,lvl:5},{id:20,lvl:5},{id:21,lvl:1},{id:34,lvl:1},{id:35,lvl:1}]},MaxUses:9999999},rewardExp:false}}]}} 

There must be a reason why the pickaxe doesn't appear in the trade menu, and I don't think it's a bug. I hope any experts on Minecraft data tagging could help me out; I would be really grateful!

1

Your sell tag is inside the buyB compound tag.

...buyB:{id:"diamond",Count:1, maxUses:9999999,sell:{...

You'll need to close the buyB tag after Count. Note that this probably means you have to remove a closing curly bracket somewhere else, lest you get unbalanced brackets.

There's also an additional maxUses tag inside sell, which doesn't do anything. Here's the fixed compound tag for that particular trade:

{buy:{id:"nether_star",Count:8},buyB:{id:"diamond",Count:1},maxUses:9999999,sell:{id:"diamond_pickaxe",Count:1,tag:{display:{Name:"Sapphire Daedalus",Lore:["The second most powerful weapon of the land.","Extremely high damage and health."]},AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:35,Operation:0,UUIDMost:90871,UUIDLeast:499725},{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0,Operation:0,UUIDMost:66479,UUIDLeast:426152}],ench:[{id:16,lvl:5},{id:17,lvl:5},{id:18,lvl:5},{id:19,lvl:5},{id:20,lvl:5},{id:21,lvl:1},{id:34,lvl:1},{id:35,lvl:1}]},},rewardExp:false}

When inserting it into your command, make sure to correctly close all brackets. It should be ]}} after this to Close the Recipes list, close Offers, close the whole thing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.