Making the player be pushed upwards when hitting an entity

Started by Dreadplot329910 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making the player be pushed upwards when hitting an entity

I'm making a mod with different enchantments, and one of them is to force the attacker to be pushed upwards when they attack an entity. I've used both the Push and Override motion vector procedure, but neither works (The procedure is triggered with the global trigger Entity is attacked)
 

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unfortunately, player…
Mon, 05/12/2025 - 21:16

Unfortunately, player movement is client-side only, which means that the Entity is Attacked global trigger can't interact with it at all because it runs on server-side only.

There may be some workaround, but I'm not sure what it would be. Maybe something with giving the player a potion effect and running the push off of that, but I'm really not sure?