How to make a mob duplicate itself every ~1 minute and to make it turn off when fed.

Started by mdotrar on

Topic category: Help with modding (Java Edition)

Last seen on 20:16, 19. Sep 2024
Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a mob duplicate itself every ~1 minute and to make it turn off when fed.

Tried everything i know, variables, effects... Nothing works
Sometimes it spawns too much, sometimes it doesn't spawn anything

Last seen on 22:57, 19. Sep 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have an idea. Make a…
Thu, 09/19/2024 - 21:42
  • I have an idea. Make a procedure that is called when the mob is spawned. Have an if linked to a global variable that can be true or false. Make it so if true the entity spawns and then calls a duplicate of the procedure except calling the first one. Then make a new procedure for if item right clicked and set the if itemstack = [your items here] and then make it result in setting the  variable to false. 
  • OPTIONAL: create a new procedure that the item right click procedure calls and have a wait block for how ever long you want a cooldown to be and then have it set the global variable to true. You would have to change the code after that to check if the variable is true again. That or just have it then call the first procedure we created.