~onSwing issue

Summary

Mythic crucible items using ~onSwing will not trigger the onswing if the item hits something.

Steps to reproduce

Weapon file:

  Skills:
  - skill{s=ShatteredHiltSwing} ~onSwing ?wearing{slot=HAND;m=ShatteredHilt}

Skills file:

ShatteredHiltSwing:
  Cooldown: 0.4
  Skills:
  - raytrace{entitySkill=ShatteredHiltAttack;raywidth=0.2;maxdistance=2.25}

ShatteredHiltAttack:
  Skills:
  - damage{amount=2;element=PHYSICAL;preventimmunity=true;ignorearmor=true}
  - effect:particles{particle=crit;amount=10;hS=0.1;vS=0.1;y=1.2;speed=0.5} @Forward{f=1.5} ?variableEquals{var=skill.crit;value="true"}

Current behavior

Shown in the video https://cdn.discordapp.com/attachments/1042258921362042930/1042259135405760562/Minecraft__1.19.2_-_Multiplayer_3rd-party_Server_2022-11-16_13-05-05.mp4

Note that on 1.18 versions, this worked properly. Currently, ~onSwing will not call if an item actually hits something with its default minecraft attack.

Intended correct behavior

~onSwing should always be called when the weapon is swung.

Proposed fixes

Make

Edited Nov 24, 2022 by Azorias
Assignee Loading
Time tracking Loading