how to make a mob check for player armor

Started by Alex_n_italy on

Topic category: Help with modding (Java Edition)

Last seen on 22:55, 4. Oct 2023
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make a mob check for player armor

Hi, so i want to make a mob attack the player always, except when he's wearing a specific helmet, how could i do that?

Last seen on 22:55, 4. Oct 2023
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Basically like an Enderman
Thu, 02/25/2021 - 13:59

Basically like an Enderman

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
use conditions on the AI…
Fri, 02/26/2021 - 19:38

use conditions on the AI attack player code block. in the conditions, check if the target has helmet

Last seen on 22:55, 4. Oct 2023
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i'm trying so, but didn't…
Sat, 02/27/2021 - 08:51

i'm trying so, but didn't succeed so far.
Am i doing right to put the Return block on the end of the if? as so far it either didn't attacked at all or always attacked.

Last seen on 22:55, 4. Oct 2023
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry for asking but, can…
Sat, 02/27/2021 - 09:01

Sorry for asking but, can you send an image on how do it exactly? I may be doing some error im not realizing.

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
create a procedure like this…
Sun, 02/28/2021 - 09:34

create a procedure like this:

https://cdn.discordapp.com/attachments/599250311852458006/815515785455730699/unknown.png

then in your entity's AI setup, put the procedure in the AI goal like this:

https://cdn.discordapp.com/attachments/599250311852458006/815516373043642368/unknown.png

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
actually make your entity's…
Sun, 02/28/2021 - 09:40

actually make your entity's AI settings like this:

https://cdn.discordapp.com/attachments/599250311852458006/815518474998513664/unknown.png

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry man, the procedure…
Sun, 02/28/2021 - 11:36

sorry man, the procedure should be like this:

https://cdn.discordapp.com/attachments/599250311852458006/815547697264066570/unknown.png

Last seen on 22:55, 4. Oct 2023
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks!
Wed, 03/03/2021 - 16:22

thanks!

Last seen on 22:55, 4. Oct 2023
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
note, actually i had to put…
Wed, 03/03/2021 - 16:32

note, actually i had to put it "= False", because otherwise mobs will attack me only when wearing the helmet.