How to make villager give you enchanted item?

Started by FFMpeg on

Topic category: Help with MCreator software

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make villager give you enchanted item?

Hi! I need that village give you for example enchanted diamond axe. How to do this?

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do you want to make a trade,…
Sun, 10/01/2023 - 14:29

Do you want to make a trade, or just a procedure that drops an enchanted diamond axe?

If you just want the villager to drop something, you can add specific enchantments to items within a procedure, you should be able to find some helpful functions in the 'item properties' tab.

If you want to add a trade for enchanted items, it's a bit more complicated. You'll want to add a trade for a regular diamond axe, then lock the loot table/trade table, open the code, and add a function to randomly enchant it, along with a pool of your desired enchantments. (This is a bit hard to explain, but Microsoft has a half-decent tutorial on how to do this, it's also quite useful for adding potions and other NBT values to loot table items.)