Reverse Knockback (Pull enemies toward you)

Started by theeminer20 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Reverse Knockback (Pull enemies toward you)

I am working on a weapons mod, which includes a "Sickle".
I need this sickle to pull hit entities toward the player (reverse knockback).


I want them to be launched in the opposite direction the player is facing. So if the player is looking down and hits the entity, the entity flies upward. I also don't want this to be that strong, just a gentle pull.


I have something working already, but it's based on where the entity is looking; they get launched in that direction.
This is under "living entity is hit with":

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Cool beans!  I look forward…
Fri, 11/07/2025 - 17:28

Cool beans!  I look forward to the mod ;).

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah. For future reference,…
Sat, 11/08/2025 - 01:54

Yeah. For future reference, I have found that what I have taken to calling "The Wonderful World of Variables" is really helpful. (I like it so much that I have probably used a bunch of overcomplicated variable procedures when there is a much easier way 😅)