Mob Variables | NBT Tags

Started by Rotmax on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob Variables | NBT Tags

Is it possible to assign a variable to a mob so you could decide, for example, if the mob would attack you or not. 

For example, if you have initially selected variable 1 at the beginning in minecraft, then only  mobs with variable 1 will attack you and mobs with variable 2 will not.

So in my Star Wars Mod in a new world you can choose to be a Jedi and every evil person will atack you (same as a sith)???

 

Thank you for your answer!

You could use NBT tab…
Sun, 06/23/2019 - 16:41

You could use NBT tab procedures from Entity management tab in procedure editor to achieve variables bound to entities.

Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you explain me exactly…
Mon, 06/24/2019 - 10:54

Can you explain me exactly what I have to do please. Yesterday I tried it all the time, but I always failed.

Use set entity NBT tag…
Tue, 06/25/2019 - 08:23

Use set entity NBT tag procedure to set variable and get entity NBT tag procedure to get the variable value. You store value in a tag with a name you decide. When reading read the tag with the same name and if the tag was set on the entity, you will get its value.

Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What event trigger i have to…
Tue, 06/25/2019 - 11:01

What event trigger i have to use to set the nbt tag variable?

Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But so i am not able to…
Sat, 07/06/2019 - 09:15

But so i am not able to change the mob ai

Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And where can i store a mob…
Sat, 07/06/2019 - 09:15

And where can i store a mob ai?