Replicating Child Mob being feed breeding item (add age to child mob)

Started by MoonHikari on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Replicating Child Mob being feed breeding item (add age to child mob)

Hello friends and fiends!

 

So I've recently joined the Mcreator community and I'm still relatively new at this. At present I'm working on a custom Mob, specifically I'm trying to tweak what happens when eats grass.

I have worked out how to make it eat grass (and when not to) and what it does to adults. What i cant work out is how to make it add age to the child mobs. I want eating grass to add age to the mob in the same way feeding a child mob the parents breading food would. I think this would be done with some form of custom code execution, but i can't work out what. Does anyone know what command/code i would use to add age to the child mob in the same way feeding it the breeding food would?

Thanks for any advice :3

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tried using: "this.entity…
Thu, 03/31/2022 - 08:55

Tried using: "this.entity.getAge()" in a procedure to see if it would work. got this error:

error: non-static variable this cannot be referenced from a static context

Age = this.entity.getAge();
          ^

anyone have any ideas on how i could insert a custom code block to get/set entity age?