Mob detect entities from a tag

Started by Trehmor on

Topic category: Help with modding (Java Edition)

Last seen on 01:22, 16. Sep 2024
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob detect entities from a tag

Im making a golem type mob that can change forms if theres a monster nearby, but it detects itself as the monster. I want it to detect certain mobs from a tag i madeso it doesnt detect itself, its possible to do that with procedures?

Last seen on 04:42, 9. Sep 2024
Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It occurs to me that in the…
Tue, 09/03/2024 - 13:07

It occurs to me that in the condition to detect things, you could add an "and" and compare two texts, in one of the compared texts you put the "get registry name" block of the entity that is being evaluated to transform, and in the other text you manually put the registry name of your golem. You put a "not" in front of the comparison.
That is, add the condition that the registry name of the evaluated entity is NOT equal to the registry name of your golem.

Although in case the golem must transform before any entity, including other golems, it occurs to me that you could do something similar to that, but using the UUID instead of the registry name. That way it will transform in the presence of other golems, but not itself.