How can I make a sword when right clicked, teleport me 10 blocks ahead of me and do damage if teleported near an entity?

Started by STG_Futureseer on

Topic category: Help with modding (Java Edition)

Last seen on 19:02, 1. Sep 2022
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I make a sword when right clicked, teleport me 10 blocks ahead of me and do damage if teleported near an entity?

Hi, 

I was wondering if there is anyway to create like a lunge/dash ability when teleported near a player will deal damage.

Last seen on 22:43, 28. Jul 2024
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To teleport 10 blocks ahead…
Sun, 01/30/2022 - 01:31

To teleport 10 blocks ahead use the set location block and use the deal damage block with a get nearest entity at x y z to damage the nearest mob of the type you choose.