How to make only one mob spawn

Started by EliteAspect21 on

Topic category: Help with modding (Java Edition)

Last seen on 12:24, 28. Oct 2020
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make only one mob spawn

Hello there my fellow modders. I am looking to make sure only one of my mobs spawns per world. I am planning to make SirenHead, but it would be horrible if you were to find 17 of the chasing you as you run through the Corrupted Dimension. Is there a way I can manually put code in or add in a procedure that will restrict spawning? I have checked the spawning parameters guide, but that does not help in the slightest.

 

Thanks in advance!

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't understand. A: Do…
Tue, 06/09/2020 - 22:46

I don't understand. A: Do you want 1 of your entity in the world? B: Or one type of entity in the world?

 

A: Why not just put the spawn chance super high.

 

B: On;

EntityJoinWorldEvent

Check if the entity is instanceof whatever entity you want and negate it. If conditions are met remove the entity.

Last seen on 06:11, 10. Jul 2024
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I too am looking for a way…
Mon, 11/27/2023 - 00:37

I too am looking for a way to make a custom mob I made spawn only one time.  We need to find something that will be true when u want the mob to spawn & then you make it false after spawning the mob.  So u can test to see if the something is true & because the gets changed as the mob spawns it should never spawn again unless that something becomes true again.  Yet I can't find what that something should be.  So I wish there was an answer here but, I am still looking.

Last seen on 07:59, 20. Sep 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That's just a GLOBAL_MAP…
Mon, 11/27/2023 - 00:55

That's just a GLOBAL_MAP variable you would toggle.