Player attacks on keybind pressed

Started by Timelord_10 on Tue, 08/06/2019 - 23:06

Topic category: Help with MCreator modding

Last seen on 20:39, 10. Aug 2019
Joined Mar 2017
User points:


  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Player attacks on keybind pressed
Tue, 08/06/2019 - 23:06

I am currently working on a mod that would need the player to do an attack when a key is pressed. At first, I thought this would work by creating a keybind, then in the keybind's event putting a "swing main hand of the entity". Unfortunately, when this is used the swing appears to only be for aesthetics as it didn't do any damage. If anyone knows who to make a player do said attack on keybind, please let me know.