Question about NBT tags

Started by Lambda System on

Topic category: Help with modding (Java Edition)

Last seen on 18:18, 5. Jul 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Question about NBT tags

I made a mob that you can dye different colors. I managed to pull it off using GeckoLib and Blockbench's little feature of having multiple textures in one model (It might not be the best method, that i recognize). However, theres an issue that I'm a little stumped on.

The color of the mob resets to it's default color whenever I reload the world (example: i dye it red in game, when i reload the world, it goes back to it's default color; lime. even if its tamed)

I feel like the key to resolving this issue involves NBT tags. If using NBT tags can maybe fix this issue, I'd like to know how I'm supposed to use them. Thanks :]

Last seen on 20:18, 12. Mar 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a procedure block…
Thu, 06/29/2023 - 21:43

There is a procedure block to set NBT data on mobs. You probably want a numerical tag. When the entity loads into the world, you can read the value of the NBT tag (using the block in Entity data) to figure out what color it should be.

Last seen on 19:33, 18. Feb 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Adding to what …
Thu, 06/29/2023 - 23:13

Adding to what @sillypantscoder said, the numerical value 1 would be red, 2 orange, 3 yellow etc.

Last seen on 18:18, 5. Jul 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i think i understand now…
Fri, 06/30/2023 - 16:51

i think i understand now. thank you all :]