Topic category: User side tutorials
I've noticed that a lot of people have had trouble making breedable mobs that work properly(Myself included) and I'm pretty sure people haven't found out how to do it yet without editing the code(correct me if I'm wrong). So, I tinkered a bit in the procedures and I found a way to do this with a custom baby model. Here are some steps:
1. Create the models: you'll need to make two models (for this I recommend tabula, techne, or blockbench)
1.You'll need an adult model. (if you are using a minecraft model for an adult then skip this.)
2.You'll need a baby model. This should probably be smaller than the adult model.
2. Create the two mobs: You'll need to create the actual mobs(the baby and the adult)
Adult: Create the adult mob and make sure it is breedable(notice: if you actually run the game at this point it will just be a baby/child mob with the same model as the adult mob)
Baby: Create the baby mob (OPTIONAL: if you want your baby mob to grow up then set up a timer procedure where it despawns the baby and spawns in the adult mob)
3.IMPORTANT: Create a procedure:
Get an if/do statement under flow control
For the if statement put: (Is event/target entity child) and (Is event/target entity: the adult mob)
For the do statement put: (Despawn event/target entity) and (Spawn at x: x, y: y, z: z living entity: the baby mob)
I hope this helped if you have any problems please leave a reply to this forum so you can be helped.
So i made the procedure but where am i supposed to put it lol
Estam, you dont need to put the procedure anywhere, if you have made the procedure with "when entity spawns" it should work when you breed your mob
And if you've read my reply you should have known
Alright, I am a bit late on this post, but I'm using exactly the same procedure as Pizzaperson23 has posted in his picture.
Brand new test mod to try it out, have the models, tested them, they work fine in-game as separate entity's.
I made the procedure and now the game crashes as soon as I log in.
Any suggestions, or does this method no longer work?
After some testing, I've boiled it down to doing what DinoDeztroyerrz says and adding "When entity spawns" trigger.
Without that, it just doesn't work, but both "mobs" spawn and act fine. Just can't breed A to make B.
As soon as I add that the game will crash if any of the adult mobs are spawned, and if I make a new game to test it, clicking on the spawn eggs of both will cause the game to crash.
Go to AI and Goals, then check 'Check to make this entity animal type, breed items:' and insert the item you want to use for breeding. Zero code is required.
In the mob renderer read the villager code for scaling baby mobs. also add the
The baby mob is not the one that spawns when i breed the adult mobs? This isn't included in the tutorial?
I tried the procedure but when my baby entity spawn one of the parents don't despawn correclty and this happen :
https://drive.google.com/file/d/1AIo05VGfvgx6XbuE_ikBYdauOsP8pWZw/view?usp=sharing https://drive.google.com/file/d/1uaA4fBrlgMuoDP9pggXS5RIO7Oq1xFrA/view?usp=sharing
sorry if I didn't explained well, I'm not english
thanks in advance
I have the same issue as Giz_Apex
Hi AnotherDude and Giz_Apex! I had the same issue as both of you. After tweaking the code for a while I found this fix for it. An adult mob no longer spawns alongside my baby mob. Hope this helps someone out in future. https://drive.google.com/file/d/1zo4AjuNhRI5Vq6lByycoBDq84eMQ2Qju/view?…
THANKSSS
I did as in the picture in the link, but the adult mob that has appeared does not disappear, although the cub appears. I'm using MCreator 2022.1, does it work there?
hey where do i put the (is event/target=adult mob)