[TUTORIAL] How to make entities age

Started by SirPogsalot on

Topic category: User side tutorials

Active 1 month ago
Joined May 2018
Points:
1117

User statistics:

  • Modifications: 8
  • Forum topics: 36
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 367
[TUTORIAL] How to make entities age

Hey there, for any of you who want to be able to make entities that age, this is how it works:

  1. Create an adult version of the entity.
  2. Create a baby version of the entity. Typically, baby mobs have smaller bodies and large heads.
  3. Create a procedure for the "on entity tick update" trigger for the baby mob.
  4. Add an NBT tag to the baby entity using the "set event/target entity data number NBT tag "[age]" to [ ]".
  5. Set the second value in the above block to "get event/target entity data number NBT tag "[age]" + [1]. That way, the entity's age will increase by 1 every tick. Keep in mind that 1 tick is 1/20 of a second, so the time it should take for your entity to grow up should be (number of seconds) * 20. For example, 5 seconds would be 100 ticks, 10 would be 200 ticks, 5 minutes would be 6000 ticks.
  6. Create an "if" block, and set the condition to "get event/target entity data NBT tag "age" = (whatever age you want it to grow up at)".
  7. Within the "if" statement, place a "despawn event/target entity" block.
  8. Below that, still within the "if" statement, place a "spawn at [x] [y] [z] living entity [adult version of the entity]."
  9. And there you go! What will happen is after the designated number of ticks have passed and the age NBT tag has reached the correct number, the baby will despawn and be replaced with an adult.

Good luck!

Active 2 years ago
Joined Jul 2020
Points:
610

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 16
i want to make minecraft…
Mon, 08/17/2020 - 15:21

i want to make minecraft foxes (but they attack you) but it's hard to me making a baby model in blockbench because it's toooo tiny and i can't find minecraft baby entities models and the baby uses the adult texture but how?

Active 3 months ago
Joined Jul 2018
Points:
721

User statistics:

  • Modifications: 2
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 10
Hello, I have a problem that…
Tue, 12/01/2020 - 21:13

Hello, I have a problem that is that I cannot finish the procedure since I do not understand that much English right now I am using a translator, well you can send me an image as a reference of how the procedure is.

Active 3 years ago
Joined Dec 2019
Points:
946

User statistics:

  • Modifications: 1
  • Forum topics: 36
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 263
Jotaro... you're approaching…
Wed, 12/02/2020 - 01:33

Jotaro... you're approaching me? Instead of running away, you're coming right to me?

Active 3 years ago
Joined Mar 2021
Points:
544

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
hi you can send a print…
Tue, 03/09/2021 - 19:22

hi you can send a print/image for examples ?I am new here

Active 3 years ago
Joined Mar 2021
Points:
544

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
what this "get event/target…
Tue, 03/09/2021 - 19:25

what this "get event/target entity data NBT tag "age"?

Active 2 years ago
Joined Jan 2023
Points:
220

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
please show a reference for…
Mon, 01/09/2023 - 23:04

please show a reference for this!

Active 7 hours ago
Joined Jul 2022
Points:
1828

User statistics:

  • Modifications: 2
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 19
  • Comments: 1766
GeckoLib entities made with…
Tue, 01/10/2023 - 01:04

GeckoLib entities made with my plugin automatically scale based on their age

Active 2 years ago
Joined Jan 2023
Points:
220

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
But, what if I am not…
Thu, 01/12/2023 - 00:39

But, what if I am not interested in installing your plogin?

Active 1 year ago
Joined Nov 2022
Points:
250

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
For anyone who's struggling…
Tue, 04/04/2023 - 20:21

For anyone who's struggling with this, here's the procedure as an image, it does work I've tested it

Active 1 year ago
Joined Nov 2020
Points:
582

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
What if it was a tamed…
Tue, 04/18/2023 - 06:52

What if it was a tamed animal? wouldnt despawning the animal and spawning another remove that attribute?

Active 6 months ago
Joined Sep 2021
Points:
472

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
I know this is an old forum,…
Sun, 08/18/2024 - 06:46

I know this is an old forum, but what if my mod is like a cow/sheep? As in, what would I do if I wanted to feed the baby it's preferred item to reduce the growing time, and have it slowly be less effective depending on how soon the baby is grown up?