enchantment check for score/advancement/literally anything that could help me
i've been desperately trying to make an enchantment only work if you have a specific advancement, it doesnt HAVE to be an advancement, but i gotta be able to set it after you get that advancement
the goal is making it so players who havent reached a certain point of progression, cant use this enchant
the .json i currently have is this:
{
"exclusive_set": [
"minecraft:infinity"
],
"anvil_cost": 1,
"description": {
"text": "Enchantment"
},
"effects": {
"minecraft:ammo_use": [
{
"effect": {
"type": "minecraft:set",
"value": 0
},
"requirements": {
"condition": "minecraft:all_of",
"terms": [
{
"condition": "minecraft:entity_scores",
"entity": "direct_attacker",
"scores": {
"journey": 1
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"items": [
"minecraft:arrow",
"minecraft:spectral_arrow",
"minecraft:tipped_arrow"
]
}
},
{
"condition": "minecraft:random_chance",
"chance": {
"type": "minecraft:enchantment_level",
"amount": {
"type": "minecraft:lookup",
"values": [
0.2,
0.25,
0.33
],
"fallback": {
"type": "minecraft:linear",
"base": 0.25,
"per_level_above_first": 0.05
}
}
}
}
]
}
}
]
},
"max_cost": {
"base": 50,
"per_level_above_first": 0
},
"max_level": 3,
"min_cost": {
"base": 20,
"per_level_above_first": 0
},
"slots": [
"mainhand"
],
"supported_items": [
"minecraft:bow",
"minecraft:crossbow"
],
"weight": 1
}
u/ICADreamer — 1 day ago