#What is wrong with my enchantment?

1 messages · Page 1 of 1 (latest)

dry heath
#

It is supposed to add more knockback when crouching, but apparently it does nothing...

{
"description": "Crouch-Knockback",
"supported_items": "minecraft:diamond_sword",
"slots": ["mainhand"],
"weight": 100,
"anvil_cost": 0,
"min_cost": {
"base": 1,
"per_level_above_first": 0
},
"max_cost": {
"base": 10,
"per_level_above_first": 0
},
"max_level": 3,
"effects": {
"minecraft:knockback": [{
"effect": {
"type": "minecraft:add",
"value": {
"type": "linear",
"base": 30,
"per_level_above_first": 200
}
},
"requirements": {
"condition": "entity_properties",
"entity": "this",
"predicate": { "flags": { "is_sneaking": true }}
}
}]
}
}

warm onyxBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1744623678:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

dry heath
#

if I turn it to damage instead of knockback it also doesn't work... is there a progblem with the condition?

#

I have that text from a video that was before 1.21.5, might that be the problem?

#

when changing the entity from "this" to "attacker" it works, I hope that that is the right solution and doesn't give other entities which attack this one an attack boost