Custom mob favorite food and self-healing

Started by Charge Cannons on

Topic category: Help with modding (Java Edition)

Last seen on 22:22, 15. Oct 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom mob favorite food and self-healing

I was wondering if there was a way to add a favorite food to a custom mob. An example would be the goblin I coded, I want its favorite food to be an apple and when it would take damage from either fall damage, player, or other hostile mobs it would eat the apple to heal itself.

Last seen on 22:49, 17. Mar 2021
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So, it takes out an item and…
Wed, 07/01/2020 - 15:35

So, it takes out an item and heals itself? Does it use the Biped or Zombie model?

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I doubt you can display the…
Wed, 07/01/2020 - 15:40

I doubt you can display the mob eating the apple like Witches drink potions without coding, but you could still make the player be able to feed the mob to heal it

(you'll have to use the user/target dependencies which were added recently, but since I am still using 2020.2 I can't help you with this :()

Last seen on 22:22, 15. Oct 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It uses biped
Thu, 07/02/2020 - 22:47

It uses biped

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If it's biped you could set…
Sat, 07/04/2020 - 12:59

If it's biped you could set an apple in its hand while it's eating and maybe also swing its arm once, but I'm not sure if would it work

You could have an nbt variable which is a timer that goes down every tick until the mob stops eating, then the mob's health is restored and the apple is removed from the hand.

If you need further explanation I could write here a procedure example

Last seen on 22:22, 15. Oct 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi, thank you. Could you…
Mon, 07/06/2020 - 15:08

Hi, thank you. Could you give a procedure example