Started by
Black Shadow
on
Topic category: Help with Minecraft modding (Java Edition)
Hi !
I would like to make a procedure that checks at each tick (already put in the trigger) if a neutral or hostile creature is targeting/targeting the player and if so give it a knockback in the opposite direction to the player.
Only I can't find blocks to check if the player is targeted or not...
Is there an alternative please?
Have a good day !
You might have to use the "entity sets attack target" trigger instead but I don't know how you could do the knockback effect. Maybe try playing around with the "attempt to override motion vector" block.
yeah its gonna be the attempt to override motion vector block
maybe find the opposite of their look direction which technically sends them backwards and put it in the x and z vectors?
@ImOd102
Yes I saw the "entity sets attack target" block but I don't understand how to use it because you can't put on an 'if' block
I mean trigger like "on player tick".