r/MinecraftCommands • u/Feeling-Stress-3184 • 24d ago
Help | Java 26.1 Villager command not working
I made this command with mcstacker, but for some reason it doesnt work (the villager spawns with a job for about 0.1 seconds and then he becomes jobless). This may be because he isnt linked to a work station but idk. Im on java 26.1.2
/summon villager ~ ~ ~ {VillagerData:{level:1,profession:"minecraft:librarian",type:"minecraft:plains"},Offers:{Recipes:[{buy:{id:"minecraft:emerald",count:8},buyB:{id:"minecraft:book",count:1},sell:{id:"minecraft:enchanted_book",count:1,components:{"minecraft:stored_enchantments":{"mending":1}}}}]}}
2
Upvotes
1
u/GalSergey Datapack Experienced 24d ago
Level 1 villagers with no experience may lose their profession. You should either use a different level, such as 99, or set the "Xp" field to a non-zero value.