Procedures

Started by Black Shadow on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedures

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 !

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You might have to use the …
Tue, 07/26/2022 - 13:38

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.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah its gonna be the…
Tue, 07/26/2022 - 13:49

yeah its gonna be the attempt to override motion vector block

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe find the opposite of…
Tue, 07/26/2022 - 13:57

maybe find the opposite of their look direction which technically sends them backwards and put it in the x and z vectors?

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@ImOd102 Yes I saw the …
Wed, 07/27/2022 - 13:04

@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

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I mean trigger like "on…
Wed, 07/27/2022 - 13:56

I mean trigger like "on player tick".