How to make a charming effect

Started by Rizzard on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a charming effect
Wed, 01/29/2025 - 14:38 (edited)

Hello, so i made this  https://imgur.com/a/qgC5tPs

It just launch me towards the entity, is there a way to make me walk slowly instead?
Like in ice and fire with the sirens for exemple

(Edit : Rizzard is the name of the entity)

Edited by Rizzard on Wed, 01/29/2025 - 14:38
Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can decrease the…
Thu, 01/30/2025 - 01:34

You can decrease the strength of the attraction by multiplying the vx, vy, and vz parameters by some constant like 0.1.

You should set the nearest entity as a local variable instead of copying it three times. It will remove redundant code and make it less resource intensive. I would also recommend using "Push [] with dx, dy, dz" instead of "Override motion vector ..." because it tends to be less janky (from limited experience).

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok, i changed to this, to…
Thu, 01/30/2025 - 16:12

ok, i changed to this, to try to get 3 small impulses towards the entity, but i really don't get why i doesn't work anymore , the projectile hits me, and it grabs me maybe 1 time out of ten, an only on impact never after the 40 ticks https://imgur.com/a/3VT06Cf (and i didn't really get what you said with using the nearest entity as a local variable)