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

Started by 4HACker4 on

Topic category: Help with Minecraft modding (Java Edition)

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?

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

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

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!