Started by
SirPogsalot
on
Topic category: User side tutorials
Hey there, for any of you who want to be able to make entities that age, this is how it works:
- Create an adult version of the entity.
- Create a baby version of the entity. Typically, baby mobs have smaller bodies and large heads.
- Create a procedure for the "on entity tick update" trigger for the baby mob.
- Add an NBT tag to the baby entity using the "set event/target entity data number NBT tag "[age]" to [ ]".
- 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.
- 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)".
- Within the "if" statement, place a "despawn event/target entity" block.
- Below that, still within the "if" statement, place a "spawn at [x] [y] [z] living entity [adult version of the entity]."
- 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!
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?
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.
Jotaro... you're approaching me? Instead of running away, you're coming right to me?
hi you can send a print/image for examples ?I am new here
what this "get event/target entity data NBT tag "age"?
please show a reference for this!
GeckoLib entities made with my plugin automatically scale based on their age
But, what if I am not interested in installing your plogin?
For anyone who's struggling with this, here's the procedure as an image, it does work I've tested it
What if it was a tamed animal? wouldnt despawning the animal and spawning another remove that attribute?
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?