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 Minecraft modding (Java Edition)

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.

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.