Knockback entities away from the player.

Started by Skittlq on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Knockback entities away from the player.
Sun, 08/14/2022 - 04:56 (edited)

I am currently making a mod, one of the items is an armour set that has the ability to knockback entities, now I got all the cooldowns and other stuff, the only thing I'm stuck on is how I can knockback the entity.

Here is my code if you want to suggest anything.

My code

 

Edited by Skittlq on Sun, 08/14/2022 - 04:56
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried implementing the…
Fri, 08/12/2022 - 08:00

I tried implementing the procedure by Riverr from the link you sent me and it didn't move the entities at all.

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Might require a bit of math…
Fri, 08/12/2022 - 23:27

Might require a bit of math to do.

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think I see the issue here…
Wed, 10/26/2022 - 03:16

I think I see the issue here. right above the "for each entity as entity iterator", you have "is event/target entity (sub)type of Monster entity" the procedure probably isn't working because it is looking to see if a mob is wearing the armor instead of the player.