entity that attacks the player

Started by Ghost187 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
entity that attacks the player
Mon, 01/29/2024 - 14:12 (edited)

I'm making a mod and I don't know how to make it so that when a player attacks an entity, another entity attacks the player, like the golems when the player attacks the villagers, my mod is for 1.20.1

Edited by Ghost187 on Mon, 01/29/2024 - 14:12
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe when the entity is…
Mon, 01/29/2024 - 16:35

Maybe when the entity is attacked, check for the other one that you want to attack the player nearby. If you find one, despawn it and spawn in one that looks the same, but attacks the player.