Knockback entities away from the player.

Started by Skittlq on

Topic category: Help with modding (Java Edition)

Last seen on 10:04, 2. Apr 2023
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
Last seen on 21:06, 11. Sep 2022
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try using the general…
Wed, 08/10/2022 - 13:18

try using the general procedure trigger "When Entity Attacked", use an if condition to see if the source entity is wearing the armor, and then use the procedure in this thread: https://mcreator.net/forum/72800/how-can-i-increase-knockback-sword

Last seen on 10:04, 2. Apr 2023
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.

Last seen on 07:30, 24. Sep 2022
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.

Last seen on 23:10, 28. Mar 2024
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.