Started by
Hopzep
on
Topic category: Help with Minecraft modding (Java Edition)
I want to knockback a target entity that the player is looking at by pressing the "Z" key, but I can only knockback the "nearest entity". Help me please.
Topic category: Help with Minecraft modding (Java Edition)
I want to knockback a target entity that the player is looking at by pressing the "Z" key, but I can only knockback the "nearest entity". Help me please.
Use vectors: Vx, Vy, Vz.
Add "Repeat (EX: 100) times" block. Add the local variable "radius". Then add the block "For each entity as entity iterator at (X + Vx * radius, Y + Vy * radius, Z + Vz * radius) in square of 2". Inside add "Override motion vector of entityiterator to Vx, Vy, Vz" and "Break loop".
Finally increase "radius" by 1 each time.