Started by
CoolCaution
on
Topic category: Help with Minecraft modding (Java Edition)
Im making a mod with entities that reproduce and grow up but, a crucial part of this is to make the baby and adult version of the mob be the same entity. ic ant use the "make two different entities, adult and baby" method. i need to make the adult and baby be the same entity that grows up and keep it's name and inventory etc... So can someone please help?
Edited by CoolCaution on Wed, 10/27/2021 - 21:32
with code.
just make 2 entities with NBTs
What do you mean can you explain in more detail?
the code or the 2 entities
That didn't explain much lol
yes, what do you want me to explain, code or 2 entities
2 entities ig, if this methods can still meet the requirements of my first comment then sure if not the explain the code method.
okay, on your Baby Entity, make a new procedure on Entity Update Tick. And put this procedure
if get NBT Number Tag "Age" of event target entity = # (Time)
do despawn event target entity
Spawn at X Y Z mob: ADULT
else if get NBT Number Tag "Age" of event target entity =/ (not equal) # (Time)
do set NBT Number Tag "Age" of event target entity to: get NBT Number Tag "Age" of event target entity + 1
Ok yeah I know about that one, and I used it for other mobs but it wont give the adult entity the name nor gui of the baby entity, if that makes sense
then use code, pretty sure Minecraft uses NBTs too. check any mobs code, however I can't promise it will maintain all of the entities inventory or names
ok, do you have any coding tips on where to start with that?
yes, watch a tutorial video so you can at least somewhat understand what the code does, learn the basic stuff like importing, packages etc. and then look through animals code
k thx
hey so I was wondering how I would be able to make a mob breed with it's same kind but the outcome will be a baby model of the adult mob (please let me know if you are confused).
I have 2 models. The Adult model and the baby model. The Adult model works fine and so does the baby but the breeding mechanism does not. I want the outcome to be a baby model but instead the outcome is the adult model. Can someone help please?
Also I thought this would be the best place to ask since replies elsewhere can be very slow.
Ok so when i make mobs I usually make a male and female versions for this reason and some other reasons but in this case I would suggest making 2 versions of the mob they don't need to be different their just need to be 2 different entities (male and female) and make a procedure that goes a little like this "If source entity (player) right clicks on (either male of female version) with (whatever you breed them with). If (whatever entity your right clicked) is in 4 block distance from (other version of entity) spawn (baby version of entity) at x position of entity, y position of entity, z position of entity.
Hope this helps sorry for late reply!