Boss minions not spawning

Started by FluvKii on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Boss minions not spawning

I'm trying to make a boss that spawns minions and make a sound when spawning them using a timer. The sound does play but the minions don't spawn. Can anyone help me with this?

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It would be easier if I…
Sat, 04/13/2024 - 12:27

It would be easier if I could see the code. However, the basic idea is that you need some sort of timer, (which I assume you've gotten working if the sound works), and then you need to randomly spawn additional entities around the boss. There's a 'spawn entity' function, one for normal spawning, another that allows you to spawn them with velocity. (If you wanted to, say, launch them outwards from the boss.) You could do the timer with an incrementing NBT number tag for the boss, (which you decrease by one every update tick, and reset when it reaches zero and spawns minions), or if there's only ever going to be one such boss at a time, you could do the same thing with a global number variable.

The simplest method for spawning is to make some local variables for offset, and set them to random integers every time you spawn a minion, so they spawn with random x/z offset from the boss. You may want to also check that the position they're trying to spawn isn't, say, inside a wall, on top of a player, etc.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your timer looks like it…
Sat, 04/13/2024 - 13:45

Your timer looks like it should work correctly. I'm not sure then why the minions wouldn't be spawning. Do you have an additional procedure to despawn them after a certain duration?

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't
Sat, 04/13/2024 - 14:59

I don't

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Don't know what the problem…
Sat, 04/13/2024 - 15:02

Don't know what the problem is then; if you're hearing the sound effect periodically, the timer is working. You could also try executing a /summon command if you think the spawning process is somehow to blame, but that really shouldn't make a difference. Have you tried summoning the minions normally, without a boss present?

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i've already tried it with…
Sat, 04/13/2024 - 16:09

i've already tried it with the command and it didnt work either. and i spawned the minions manually and they spawned just fine

 

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That's quite unusual. So you…
Sat, 04/13/2024 - 16:17

That's quite unusual. So you're saying you can spawn them in-game using a command, but not using a function, or a function that runs a command? And there isn't anything else that could possibly be causing them to despawn? (Low render distance, plugin interferance, the boss attacking them, low tracking distance or size, etc?)

If that's the case, It's possible there's something wrong with the way it's compiling the code, and it might be worth regenerating the code, or reloading the gradle project, which you can do from the 'build & run' menu. (Just to make sure it isn't just a corrupted cache or something.) You could also try using the other 'summon entity' function, the one that uses velocity instead of yaw. There's also a possibility, if you're using the newest release of MCreator, that this is some sort of unresolved bug, and if you've tested it thoroughly and can't find a way to fix it, it may be worth reporting on the issue tracker. Otherwise, I really don't know what to tell ya. :(

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just discovered that this…
Sat, 04/13/2024 - 22:40

I just discovered that this aparently also doesn't work with explosions and particles.. :(

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That's... really weird. What…
Sat, 04/13/2024 - 22:42

That's... really weird. What version of MCreator are you using? This stuff should definitely be working first try. Definitely try reloading the gradle caches.

(This is probably really dumb, but have you also checked your difficulty isn't set to peaceful, and your particles are enabled? I have separately spent several hours debugging things where it turns out I just forgot to change the difficulty/reenable particles.)

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i always put my difficulty…
Mon, 04/15/2024 - 15:48

i always put my difficulty on hard when testing my mod and i am using version 2023.4, im probably gonna download 2024.1 soon