How do I make one entity spawn another every 30 seconds?

Started by 4HACker4 on

Topic category: Help with modding (Java Edition)

Last seen on 13:53, 17. Mar 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make one entity spawn another every 30 seconds?

I am making a mob, however I am trying to get it to spawn about 5 other mobs every 30 seconds at it's position, however I can't seem to figure it out. I tried using a procedure for On Entity Tick Update, the current code is:

Wait 600 ticks then on server-side

do      Repeat 5: Execute command summon (entityname) at x: x y: y z: z

 

However this just waits 30 seconds and then spams the entity spawning at the place the initial mob was first spawned in. Anyone know how to fix this?

Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
set a timer NBT number for…
Thu, 12/21/2023 - 01:46

set a timer NBT number for example 1200 (for 1 rl minute) and tell it to spawn another mob when it reaches like idk 600, this will spawn 1 extra mob each minute from that mob (notice this is a geometric progression - if it spawn the same mob it will keep spawning more and more, like a virus), much better than loops if u ask me

Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also set something like x+1…
Thu, 12/21/2023 - 01:47

also set something like x+1 and z+1 so it wont spawn inside the other mob

Last seen on 13:53, 17. Mar 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks, that worked!
Sat, 12/23/2023 - 18:47

Thanks, that worked!