How to use mob's conditions?

Started by ShAdOw112 on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Mar 2017
Points:
781

User statistics:

  • Modifications: 1
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
How to use mob's conditions?

Hi! I created a custom mob and gave him AI. It should attack everyone except for entities whose have a tag. Is it possible to make it? If so, how to do this in mob's conditions?

Active 3 years ago
Joined May 2020
Points:
669

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 27
Well I don't know how to…
Mon, 11/30/2020 - 05:29

Well I don't know how to explain this but...

First do you need to create the tag entity and put in that all the entities do you want, then create the procedure:

if (put the entity tag)  =  true

      return false

return true

In procedures with logic type you need to put "return true" under the condition. Well then go to your entity and make for the AI that can attack living entities or mobs (mobs are agressive entities), then in conditions of that put your procedure in the first condition and it's done. If you can't make tags entities you can put in the condition subtypes of the entities you want, put all of them like: [(subtype 1) or (subtype 2) ] = true

Active 2 years ago
Joined Mar 2017
Points:
781

User statistics:

  • Modifications: 1
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
I did it like this: if this…
Mon, 11/30/2020 - 19:25

I did it like this:
if this entity has NBT tag "A"
do: Return: False
Return: False
But it still keeps beating me and I tried to change its target to Mob, Creature and AmbientCreature but it didn't even notice me (I didn't turn on the condition. What should I do?

Active 2 years ago
Joined Mar 2017
Points:
781

User statistics:

  • Modifications: 1
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
P.S. In the last 'Return' I…
Mon, 11/30/2020 - 19:26

P.S. In the last 'Return' I used "True"

Active 3 years ago
Joined May 2020
Points:
669

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 27
You need to put  if this…
Mon, 11/30/2020 - 19:53

You need to put 

if this entity has NBT tag "A"  = true

 

Active 2 years ago
Joined Oct 2019
Points:
810

User statistics:

  • Modifications: 0
  • Forum topics: 11
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 209
Return ( not ( Get NBT tag …
Sat, 02/20/2021 - 20:06

Return ( not ( Get NBT tag "A" ) )

Do you mean this?

Active 19 hours ago
Joined Mar 2018
Points:
776

User statistics:

  • Modifications: 0
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 47
I did as you explained but…
Thu, 08/18/2022 - 19:40

I did as you explained but it doesn't work(TestProc

Active 2 years ago
Joined Feb 2022
Points:
645

User statistics:

  • Modifications: 0
  • Forum topics: 18
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 158
Instead do "return (your…
Thu, 08/18/2022 - 20:58

Instead do "return (your condition)"

Active 1 year ago
Joined Dec 2021
Points:
520

User statistics:

  • Modifications: 2
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
Use Get entity [Event entity…
Tue, 07/25/2023 - 17:20

Use Get entity [Event entity] is targeting for attack Which is in the entity data tab.

Put it where event entity is in your procedure

Hope this helps.