Help with cancel Swing/Left Click

Started by Suddz on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with cancel Swing/Left Click

So i have been messing around with geckolib animations, and i really want to use left click for this but the swing animation ruins it.

Is there a way to cancel the swing? I know the haste and attack speed increase to somewhat disable the swing but i am avoiding that for obvious reasons.

 

Thanks!

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could try using haste…
Fri, 10/13/2023 - 17:13

you could try using haste 110 for 3 ticks in item hand tick in main hand, you would like to change the harvesting level of your item into a negative number so players cannot abuse the effect. 

this is the closest thing that i know about "canceling swing animation"

Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I found out how to fix it…
Mon, 05/13/2024 - 01:49

I found out how to fix it. Change the onEntitySwing() method in the "item_name".java class to return true you can lock the code and add this or you can use a mixin.

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Have you managed do solve…
Mon, 10/07/2024 - 21:58

Have you managed do solve the problem?