Replace equipment enchant predicate with slots

This should be more compact and versatile
https://minecraft.wiki/w/Predicate#JSON_format
https://minecraft.wiki/w/Slot
This commit is contained in:
Sergeant Acoustic 2026-02-23 02:20:29 +00:00
parent 5ca1344ede
commit 562981cc2e
2 changed files with 9 additions and 25 deletions

View file

@ -35,31 +35,15 @@
"factor": 4 "factor": 4
}, },
"requirements": { "requirements": {
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:entity_properties", "condition": "minecraft:entity_properties",
"entity": "this", "entity": "this",
"predicate": { "predicate": {
"equipment": { "slots": {
"mainhand": { "weapon.*": {
"items": "#mc_rebalance:exploit_items" "items": "#mc_rebalance:exploit_items"
} }
} }
} }
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"items": "#mc_rebalance:exploit_items"
}
}
}
}
]
} }
} }
] ]

View file

@ -46,8 +46,8 @@
"condition": "minecraft:entity_properties", "condition": "minecraft:entity_properties",
"entity": "this", "entity": "this",
"predicate": { "predicate": {
"equipment": { "slots": {
"legs": { "armor.*": {
"predicates": { "predicates": {
"minecraft:enchantments": [{"enchantments": "minecraft:frost_walker"}] "minecraft:enchantments": [{"enchantments": "minecraft:frost_walker"}]
} }