#Really simple one: How do I make mending accessible with an enchantment table

1 messages · Page 1 of 1 (latest)

spiral axle
#

I've been trying all day to create a datapack that makes mending a non treasure encahntment, and it being available through the enchantment table, but no success whatsoever. I decided to come to the experts. The version I wish to make this for is 1.20.1. I've read over the wiki, made the pack over and over again, but it never works. I've been basing the pack off of this datapack: https://modrinth.com/datapack/easy-mending
I'd use the datapack, but it doesn't work either. I have no ideas left. Help please.

spice niche
#

The method that datapack uses to add mending to the enchanting table only works in 1.21+ I think. It wont work in 1.20.1 and you would need to use another method for that version

spiral axle
#

could you reccomend me the method to use in pre 1.21?

spice niche
#

best I think atm is to add mending randomly after the player enchants something

#

that has its own problems to solve

spice niche
#

yeah idk. I thought of using the advancment trigger for enchant_item but that doesn't help specfiy the item to add mending to. You would have to add mending to the result item within the enchantment table if that is even possible. It also wouldn't be the same as adding mending to the enchantment pool unless you are also removing enchantments from an item to grant the same level of value. Otherwise it is just enchanting normally but there is a 1/10 or whatever chance that mending is also added.

#

seems like a bit of a hastle unfortunately unless there is another method I am missing

gentle scarab
#

According to the wiki, enchantments that appear in the enchanting table are specified in the in_enchanting_table enchantment tag

#

Adding mending to this tag should work

gentle scarab
#

Missed that part