How to make a mob-trap? [resolved]

Started by Ball-van on Tue, 05/04/2021 - 16:16

Topic category: Help with modding (Java Edition)

Last seen on 13:17, 14. May 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make a mob-trap? [resolved]
Wed, 05/05/2021 - 10:17 (edited)

Hello everyone!
Can a mob be trap? According to the fact that at the beginning the mob has a different model or texture and does not show aggression towards the player, but when the player comes close to this mob, it changes and starts attacking the player. (For example: there is a villager, but when the player comes close to him, the villager turns into a zombie and attacks the player)

Edited by Ball-van on Wed, 05/05/2021 - 10:17
Last seen on 20:01, 13. May 2021
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
yes, you must create two…
Tue, 05/04/2021 - 19:45

yes, you must create two entities, the pacific and the aggressive entity
in the pacific entity add a procedure "on entity tick update".
1

I used as an example the zombie villager, you change it to your aggressive entity

now, in your aggressive entity add "on entity tick update" and a procedure similar to the previous one but don't forget to add the "not".
2

Last seen on 13:17, 14. May 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Wow! Thanks a lot! You…
Wed, 05/05/2021 - 10:17

Wow! Thanks a lot! You helped me a lot!