How To Flag Mob As Child

Started by CoolCaution on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How To Flag Mob As Child
Wed, 10/27/2021 - 21:32 (edited)

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
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
with code. just make 2…
Wed, 10/27/2021 - 21:35

with code.

just make 2 entities with NBTs

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What do you mean can you…
Wed, 10/27/2021 - 21:37

What do you mean can you explain in more detail?

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the code or the 2 entities
Wed, 10/27/2021 - 21:52

the code or the 2 entities

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That didn't explain much lol
Wed, 10/27/2021 - 21:58

That didn't explain much lol

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes, what do you want me to…
Wed, 10/27/2021 - 22:17

yes, what do you want me to explain, code or 2 entities

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
2 entities ig, if this…
Wed, 10/27/2021 - 22:39

2 entities ig, if this methods can still meet the requirements of my first comment then sure if not the explain the code method.

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
okay, on your Baby Entity,…
Wed, 10/27/2021 - 23:07

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

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok yeah I know about that…
Wed, 10/27/2021 - 23:17

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

 

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
then use code, pretty sure…
Wed, 10/27/2021 - 23:30

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

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok, do you have any coding…
Wed, 10/27/2021 - 23:44

ok, do you have any coding tips on where to start with that?

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes, watch a tutorial video…
Wed, 10/27/2021 - 23:52

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

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hey so I was wondering how I…
Tue, 11/02/2021 - 01:27

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.

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok so when i make mobs I…
Tue, 12/14/2021 - 20:44

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!