[Solved] Procedure loop help

Started by padrino on Tue, 09/01/2020 - 14:46

Topic category: Help with modding (Java Edition)

Last seen on 01:42, 17. Nov 2020
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
[Solved] Procedure loop help
Tue, 09/01/2020 - 17:13 (edited)

hello,

I have created an animal mod and inside there are ducks! I would like them to lay eggs every X minutes. I can do it perfectly but only once! I can't figure out how to make a loop ! I tried everything without success... if someone has a solution I'll take it ! :)

 

 

Edited by padrino on Tue, 09/01/2020 - 17:13
That sounds like a good mod!…
Tue, 09/01/2020 - 15:57

That sounds like a good mod!

To make what you have said possible, I would suggest a simple Looped NBT Timer

Basically, you link a procedure to on entity update tick procedure trigger in you entity settings

Use the following procedures:

Loop Forever

set NBT number tag EggTimer to (Get EggTimer + 1)

If EggTimer = <Imput ticks for the Egg Generation time here>

Spawn Egg Block

Set EggTimer to 0

End Loop

 

I hope that helps and Happy Modding!

Last seen on 01:42, 17. Nov 2020
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I found this before I saw…
Tue, 09/01/2020 - 17:04

I found this before I saw your answer! Thanks anyway but it's solved! :)