How to get a mob to attack an entity they cant see

Started by beam56 on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Mar 2024
Points:
111

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
How to get a mob to attack an entity they cant see

Im trying to make a small mod that has a monster that attacks cows. I need the monster to be able to start running towards the cow without having a direct sightline of it. kinda similar to how pillagers are with villagers, even though they cant see the villager they move towards the villager and attack it. Is there anyway to do this or replicate the pillagers behavior with villagers except with a cow instead?

Active 1 month ago
Joined Mar 2024
Points:
152

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 40
(No subject)
Wed, 03/27/2024 - 08:52

Image 1

Active 1 month ago
Joined Mar 2024
Points:
152

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 40
(No subject)
Wed, 03/27/2024 - 08:59

Image 1

Active 1 month ago
Joined Mar 2024
Points:
152

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 40
He doesn't see the cow and…
Wed, 03/27/2024 - 09:02

Image 1He doesn't see the cow and doesn't attack, just like the pillager

Active 4 months ago
Joined Jan 2024
Points:
161

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 62
try to put this procedure in…
Wed, 03/27/2024 - 10:41

try to put this procedure in your spider triger "entity tick update"

https://imgur.com/a/67EZku5

Hope it work ;)