I am working on a weapon datapack that is a lot like the Forge mod Spartan Weaponry. I am currently creating a dagger and I want to disable the sweeping edge ability from 1.9 while still having 1.9 combat (attack cooldown, shields, et cetera). I have done some research and I cannot find many resources about the topic that is recent. Does anyone have an idea on how to achieve this or an alternative?

1 Answer 1


I highly doubt this is possible with commands. But oh well, I could be wrong.

Charge meter

So now, there is a "charge meter" that determines whether a sweep attack will occur ot not.

According to the Fandom Minecraft Wiki:

If the attack recharge meter is 84.8% or above and the player is on the ground standing or moving slower than the sprinting speed in a straight line, the sword performs a sweeping attack indicated by a gale particle that reaches nearby enemies for 1 Half Heart and knocks them back; the amount of knockback is 80% that of the basal knockback and does not benefit from the knockback enchantment. As result, the player can perform a sweep attack while they are sprinting diagonally but it is impossible to perform a sweep attack at the same time as a critical hit or while riding some entity.

So some quick ideas off the bat:

  • Find a modpack that has an invisible entity below you but won't affect your height, jumps etc.
  • Have the sprinting speed be the same as the sprinting speed in a straight line


To continue, someone had the idea of attempting to detect a sweep attack on spigotmc:

You could attempt to detect the sweep attack. Below example is used to detect it, it needs fetching the tick (e.g. a tick task counting up, or you try to use attacker.getTicksLived, which might be as good in this case, i've only tested with a tick task though) keeping some data (tick + location hash), it's not perfect / maximally confined but appears to work quite well.

// 1.9: sweep attack.
final int locHashCode = LocUtil.hashCode(loc); // ATTACKER
if (originalDamage == 1.0) {
    // Might be a sweep attack.
    if (tick == data.sweepTick && locHashCode == data.sweepLocationHashCode) {
        return cancelled;
else {
    data.sweepTick = tick;
    data.sweepLocationHashCode = locHashCode;

(Idea being that 1.0 original (!) damage seems to be what the sweep attack does, it'll also be the same tick. Confine by location of the attackr, update location+ tick with other than 1.0 original damage.)

Answer to be continued...


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .