entity that attacks the player

Started by Ghost187 on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Jan 2024
Points:
118

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
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
Active 6 months ago
Joined Oct 2023
Points:
303

User statistics:

  • Modifications: 1
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 274
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.